What’s Vulnerable › Vulnerabilities

CVE-2026-39979: jq: Out-of-Bounds Read in jv_parse_sized() Error Formatting for Non-NUL-Terminated Counted Buffers

Description

jq is a command-line JSON processor. In commits before 2f09060afab23fe9390cce7cb860b10416e1bf5f, the jv_parse_sized() API in libjq accepts a counted buffer with an explicit length parameter, but its error-handling path formats the input buffer using %s in jv_string_fmt(), which reads until a NUL terminator is found rather than respecting the caller-supplied length. This means that when malformed JSON is passed in a non-NUL-terminated buffer, the error construction logic performs an out-of-bounds read past the end of the buffer. The vulnerability is reachable by any libjq consumer calling jv_parse_sized() with untrusted input, and depending on memory layout, can result in memory disclosure or process termination. The issue has been patched in commit 2f09060afab23fe9390cce7cb860b10416e1bf5f.

Affected products

How to fix

Upgrade to a fixed version: jqlang jq 1.8.2; Red Hat AI Inference Server 3.2.2, 3.3.5; Red Hat OpenShift AI 2.25 3.4.3; Red Hat OpenShift Container Platform 4.18 4.12.92, 4.13.68, 4.14.68, 4.15.65. Check the vendor advisory for mitigations.

References

Get alerted when CVE-2026-39979 or the next vulnerability affects your stack