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 package | Versions | Reported by |
|---|---|---|
| jqlang jq | < 2f09060afab23fe9390cce7cb860b10416e1bf5f, before 1.8.2 | CVE List, NVD |
| jq | Not 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 |
| rhcos | Not 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-rhel9 | Not specified Not affected: from 1780681984 before *, from 1782352950 before * | CVE List |
| rhaiis/vllm-spyre-rhel9 | Not specified Not affected: from 1782352919 before * | CVE List |
| rhaiis/vllm-rocm-rhel9 | Not specified Not affected: from 1782353093 before * | CVE List |
| rhaiis/vllm-cuda-rhel9 | Not specified Not affected: from 1782352847 before * | CVE List |
| jq-main | Not specified Not affected: from 1.8.1-3.hum1 before * | CVE List |
| ansible-automation-platform-26/controller-rhel9 | Not specified | CVE List |
| ansible-automation-platform-26/hub-rhel9 | Not specified | CVE List |
| automation-controller | Not specified | CVE List |
| redhat ai_inference_server | from 3.2.0 before 3.2.2, from 3.3.0 before 3.3.5 | NVD |
| redhat ansible_automation_platform | 2.0 | NVD |
| redhat ceph_storage | 4.0 | NVD |
| redhat codeready_linux_builder | 8.0, 9.0, 10.0 | NVD |
| redhat codeready_linux_builder_eus | 9.4, 9.6, 10.0 | NVD |
| redhat hardened_images | Not specified | NVD |
| redhat openshift_ai | from 3.4 before 3.4.3 | NVD |
| redhat openshift_container_platform | from 4.12 before 4.12.92, from 4.13 before 4.13.68, from 4.14 before 4.14.68, from 4.15 before 4.15.65, from 4.16 before 4.16.64, from 4.17 before 4.17.55, from 4.18 before 4.18.44, from 4.19 before 4.19.33 | NVD |
| redhat enterprise_linux | 8.0, 9.0, 10.0 | NVD |
| redhat enterprise_linux_aus | 8.4, 8.6 | NVD |
| redhat enterprise_linux_eus | 8.4, 9.4, 9.6, 10.0 | NVD |
| redhat enterprise_linux_tus | 8.6, 8.8 | NVD |
| redhat enterprise_linux_update_services_for_sap_solutions | 8.6, 8.8, 9.0, 9.2 | NVD |
All scores
| GitHub_M | 6.9medium CVSS:4.0 | CVSS: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-SADP | 8.2high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H |
| NVD | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L |
Classification
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
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-39979 changed 2026-07-15 | CVE Terms of Use |
| NVD | CVE-2026-39979 changed 2026-10-26 | Public domain |