CVE-2026-39979
JSON

6.9medium

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

Severity
6.9medium CVSS:4.0 by GitHub_M
Exploit likelihood
0.60% (higher than 49% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M

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

Product or packageVersionsReported by
jqlang jq< 2f09060afab23fe9390cce7cb860b10416e1bf5f, before 1.8.2CVE List, NVD
jqNot specified
Not affected: from 0:1.7.1-11.el10_1.0.2 before *, from 0:1.7.1-11.el10_2.2 before *, from 0:1.7.1-8.el10_0.3 before *, from 0:1.6-12.el8_10 before *, from 0:1.5-12.el8_4.5 before *, from 0:1.6-3.el8_6.2 before *
CVE List
rhcosNot specified
Not affected: from 412.86.202606140301-0 before *, from 413.92.202606160406-0 before *, from 414.92.202606231112-0 before *, from 415.92.202606030318-0 before *, from 416.94.202606051757-0 before *, from 417.94.202606250942-0 before *
CVE List
rhaiis/model-opt-cuda-rhel9Not specified
Not affected: from 1780681984 before *, from 1782352950 before *
CVE List
rhaiis/vllm-spyre-rhel9Not specified
Not affected: from 1782352919 before *
CVE List
rhaiis/vllm-rocm-rhel9Not specified
Not affected: from 1782353093 before *
CVE List
rhaiis/vllm-cuda-rhel9Not specified
Not affected: from 1782352847 before *
CVE List
jq-mainNot specified
Not affected: from 1.8.1-3.hum1 before *
CVE List
ansible-automation-platform-26/controller-rhel9Not specifiedCVE List
ansible-automation-platform-26/hub-rhel9Not specifiedCVE List
automation-controllerNot specifiedCVE List
redhat ai_inference_serverfrom 3.2.0 before 3.2.2, from 3.3.0 before 3.3.5NVD

All scores

GitHub_M6.9medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N
redhat-SADP8.2high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
NVD6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L

Classification

CWE-125

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.

What each source says

CVE List

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.

NVD (es)

jq es un procesador JSON de línea de comandos. En commits anteriores a 2f09060afab23fe9390cce7cb860b10416e1bf5f, la API jv_parse_sized() en libjq acepta un búfer contado con un parámetro de longitud explícito, pero su ruta de manejo de errores formatea el búfer de entrada usando %s en jv_string_fmt(), que lee hasta que se encuentra un terminador NUL en lugar de respetar la longitud proporcionada por el llamador. Esto significa que cuando se pasa JSON malformado en un búfer no terminado en NUL, la lógica de construcción de errores realiza una lectura fuera de límites más allá del final del búfer. La vulnerabilidad es alcanzable por cualquier consumidor de libjq que llama a jv_parse_sized() con entrada no confiable, y, dependiendo de la disposición de la memoria, puede resultar en divulgación de memoria o terminación del proceso. El problema ha sido parcheado en el commit 2f09060afab23fe9390cce7cb860b10416e1bf5f.

References

https://github.com/jqlang/jq/security/advisories/GHSA-2hhh-px8h-355pexploit, vendor-advisory
https://github.com/jqlang/jq/commit/2f09060afab23fe9390cce7cb860b10416e1bf5fpatch
https://access.redhat.com/security/cve/CVE-2026-39979third-party-advisory, vdb-entry
https://bugzilla.redhat.com/show_bug.cgi?id=2458077issue-tracking, third-party-advisory
https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-39979.jsonthird-party-advisory
https://access.redhat.com/errata/RHSA-2026:26528third-party-advisory, vendor-advisory
https://access.redhat.com/errata/RHSA-2026:26542third-party-advisory, vendor-advisory
https://access.redhat.com/errata/RHSA-2026:28887third-party-advisory, vendor-advisory
https://access.redhat.com/errata/RHSA-2026:23233third-party-advisory, vendor-advisory
https://access.redhat.com/errata/RHSA-2026:25044third-party-advisory, vendor-advisory
https://access.redhat.com/errata/RHSA-2026:34098third-party-advisory, vendor-advisory
https://access.redhat.com/errata/RHSA-2026:25181third-party-advisory, vendor-advisory

Sources

SourceRecordLicence
CVE ListCVE-2026-39979 changed 2026-07-15CVE Terms of Use
NVDCVE-2026-39979 changed 2026-10-26Public domain