CVE Vulnerabilities

CVE-2026-39979

Out-of-bounds Read

Published: Apr 13, 2026 | Modified: Apr 23, 2026
CVSS 3.x
6.5
MEDIUM
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L
CVSS 2.x
RedHat/V2
RedHat/V3
8.2 IMPORTANT
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
Ubuntu
MEDIUM
root.io logo minimus.io logo echo.ai logo

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.

Weakness

The product reads data past the end, or before the beginning, of the intended buffer.

Affected Software

NameVendorStart VersionEnd Version
JqJqlang*2026-04-12 (excluding)
Red Hat Enterprise Linux 10RedHatjq-0:1.7.1-11.el10_1.0.2*
Red Hat Enterprise Linux 10RedHatjq-0:1.7.1-11.el10_2.2*
Red Hat Enterprise Linux 10.0 Extended Update SupportRedHatjq-0:1.7.1-8.el10_0.3*
Red Hat Enterprise Linux 8RedHatjq-0:1.6-12.el8_10*
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update SupportRedHatjq-0:1.5-12.el8_4.5*
Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-OnRedHatjq-0:1.5-12.el8_4.5*
Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update SupportRedHatjq-0:1.6-3.el8_6.2*
Red Hat Enterprise Linux 8.6 Telecommunications Update ServiceRedHatjq-0:1.6-3.el8_6.2*
Red Hat Enterprise Linux 8.6 Update Services for SAP SolutionsRedHatjq-0:1.6-3.el8_6.2*
Red Hat Enterprise Linux 8.8 Telecommunications Update ServiceRedHatjq-0:1.6-6.el8_8.4*
Red Hat Enterprise Linux 8.8 Update Services for SAP SolutionsRedHatjq-0:1.6-6.el8_8.4*
Red Hat Enterprise Linux 9RedHatjq-0:1.6-19.el9_7.0.2*
Red Hat Enterprise Linux 9RedHatjq-0:1.6-19.el9_8.2*
Red Hat Enterprise Linux 9.0 Update Services for SAP SolutionsRedHatjq-0:1.6-12.el9_0.3*
Red Hat Enterprise Linux 9.2 Update Services for SAP SolutionsRedHatjq-0:1.6-15.el9_2.3*
Red Hat Enterprise Linux 9.4 Extended Update SupportRedHatjq-0:1.6-16.el9_4.2*
Red Hat Enterprise Linux 9.6 Extended Update SupportRedHatjq-0:1.6-17.el9_6.4*
Red Hat OpenShift Container Platform 4.15RedHatrhcos-415.92.202606030318-0*
Red Hat OpenShift Container Platform 4.16RedHatrhcos-416.94.202606051757-0*
Red Hat OpenShift Container Platform 4.18RedHatrhcos-418.94.202606051320-0*
Red Hat OpenShift Container Platform 4.19RedHatrhcos-4.19.9.6.202606031700-0*
Red Hat AI Inference Server 3.2RedHatrhaiis/model-opt-cuda-rhel9:1780681984*
Red Hat Hardened ImagesRedHatjq-main-1.8.1-3.hum1*
JqUbuntuesm-apps-legacy/xenial*
JqUbuntuesm-apps/bionic*
JqUbuntuesm-apps/xenial*
JqUbuntuesm-infra-legacy/trusty*
JqUbuntuesm-infra/focal*
JqUbuntujammy*
JqUbuntunoble*
JqUbuntuquesting*
JqUbunturesolute*
JqUbuntuupstream*

Potential Mitigations

  • Assume all input is malicious. Use an “accept known good” input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
  • When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, “boat” may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as “red” or “blue.”
  • Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code’s environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
  • To reduce the likelihood of introducing an out-of-bounds read, ensure that you validate and ensure correct calculations for any length argument, buffer size calculation, or offset. Be especially careful of relying on a sentinel (i.e. special character such as NUL) in untrusted inputs.

References