6.9Medium

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

jqlang jq; Red Hat Red Hat Enterprise Linux 10; Red Hat Red Hat Enterprise Linux 10.0 Extended Update Support; Red Hat Red Hat Enterprise Linux 8 Published: (7 months ago)

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.

Weakness (CWE): CWE-125

Data: CVE.org, NVD, CISA KEV, FIRST EPSS, Ubuntu. Published as the sources state it, in English.

Affected products and versions

VendorProductVersions
ai inference server 3.2 —
ai inference server 3.3 —
jqlang jq < 2f09060afab23fe9390cce7cb860b10416e1bf5f
openshift 4.12 —
openshift 4.13 —
openshift 4.14 —
openshift 4.15 —
openshift 4.16 —
openshift 4.17 —
openshift 4.18 —
openshift 4.19 —
redhat ai inference server 3.2.0 – < 3.2.2
redhat ansible automation platform 2.0
redhat ceph storage 4.0
redhat codeready linux builder 8.0
redhat codeready linux builder eus 9.4
redhat enterprise linux 8.0
redhat enterprise linux aus 8.4
redhat enterprise linux eus 8.4
redhat enterprise linux tus 8.6
redhat enterprise linux update services for sap solutions 8.6
redhat hardened images —
redhat openshift ai 3.4 – < 3.4.3
redhat openshift container platform 4.12 – < 4.12.92
Red Hat Red Hat AI Inference Server 3.2 all versions
Red Hat Red Hat AI Inference Server 3.3 all versions
Red Hat Red Hat Ansible Automation Platform 2 all versions
Red Hat Red Hat Ceph Storage 4 all versions
Red Hat Red Hat Enterprise Linux 10 all versions
Red Hat Red Hat Enterprise Linux 10.0 Extended Update Support all versions
Red Hat Red Hat Enterprise Linux 8 all versions
Red Hat Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support all versions
Red Hat Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On all versions
Red Hat Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support all versions
Red Hat Red Hat Enterprise Linux 8.6 Telecommunications Update Service all versions
Red Hat Red Hat Enterprise Linux 8.6 Update Services for SAP Solutions all versions
Red Hat Red Hat Enterprise Linux 8.8 Telecommunications Update Service all versions
Red Hat Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions all versions
Red Hat Red Hat Enterprise Linux 9 all versions
Red Hat Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions all versions
Red Hat Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions all versions
Red Hat Red Hat Enterprise Linux 9.4 Extended Update Support all versions
Red Hat Red Hat Enterprise Linux 9.6 Extended Update Support all versions
Red Hat Red Hat Hardened Images all versions
Red Hat Red Hat OpenShift Container Platform 4.12 all versions
Red Hat Red Hat OpenShift Container Platform 4.13 all versions
Red Hat Red Hat OpenShift Container Platform 4.14 all versions
Red Hat Red Hat OpenShift Container Platform 4.15 all versions
Red Hat Red Hat OpenShift Container Platform 4.16 all versions
Red Hat Red Hat OpenShift Container Platform 4.17 all versions
Red Hat Red Hat OpenShift Container Platform 4.18 all versions
Red Hat Red Hat OpenShift Container Platform 4.19 all versions

References and patches

CPE matches (NVD) (36)

  • cpe:2.3:a:jqlang:jq:*:*:*:*:*:*:*:* < 1.8.2
  • cpe:2.3:a:redhat:ai_inference_server:*:*:*:*:*:*:*:* ≥ 3.2.0 < 3.2.2
  • cpe:2.3:a:redhat:ai_inference_server:*:*:*:*:*:*:*:* ≥ 3.3.0 < 3.3.5
  • cpe:2.3:a:redhat:ansible_automation_platform:2.0:*:*:*:*:*:*:*
  • cpe:2.3:a:redhat:ceph_storage:4.0:*:*:*:*:*:*:*
  • cpe:2.3:a:redhat:codeready_linux_builder:8.0:*:*:*:*:*:*:*
  • cpe:2.3:a:redhat:codeready_linux_builder:9.0:*:*:*:*:*:*:*
  • cpe:2.3:a:redhat:codeready_linux_builder:10.0:*:*:*:*:*:*:*
  • cpe:2.3:a:redhat:codeready_linux_builder_eus:9.4:*:*:*:*:*:*:*
  • cpe:2.3:a:redhat:codeready_linux_builder_eus:9.6:*:*:*:*:*:*:*
  • cpe:2.3:a:redhat:codeready_linux_builder_eus:10.0:*:*:*:*:*:*:*
  • cpe:2.3:a:redhat:hardened_images:-:*:*:*:*:*:*:*
  • cpe:2.3:a:redhat:openshift_ai:*:*:*:*:*:*:*:* ≥ 3.4 < 3.4.3
  • cpe:2.3:a:redhat:openshift_container_platform:*:*:*:*:*:*:*:* ≥ 4.12 < 4.12.92
  • cpe:2.3:a:redhat:openshift_container_platform:*:*:*:*:*:*:*:* ≥ 4.13 < 4.13.68
  • cpe:2.3:a:redhat:openshift_container_platform:*:*:*:*:*:*:*:* ≥ 4.14 < 4.14.68
  • cpe:2.3:a:redhat:openshift_container_platform:*:*:*:*:*:*:*:* ≥ 4.15 < 4.15.65
  • cpe:2.3:a:redhat:openshift_container_platform:*:*:*:*:*:*:*:* ≥ 4.16 < 4.16.64
  • cpe:2.3:a:redhat:openshift_container_platform:*:*:*:*:*:*:*:* ≥ 4.17 < 4.17.55
  • cpe:2.3:a:redhat:openshift_container_platform:*:*:*:*:*:*:*:* ≥ 4.18 < 4.18.44
  • cpe:2.3:a:redhat:openshift_container_platform:*:*:*:*:*:*:*:* ≥ 4.19 < 4.19.33
  • cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:*
  • cpe:2.3:o:redhat:enterprise_linux:9.0:*:*:*:*:*:*:*
  • cpe:2.3:o:redhat:enterprise_linux:10.0:*:*:*:*:*:*:*
  • cpe:2.3:o:redhat:enterprise_linux_aus:8.4:*:*:*:*:*:*:*
  • cpe:2.3:o:redhat:enterprise_linux_aus:8.6:*:*:*:*:*:*:*
  • cpe:2.3:o:redhat:enterprise_linux_eus:8.4:*:*:*:*:*:*:*
  • cpe:2.3:o:redhat:enterprise_linux_eus:9.4:*:*:*:*:*:*:*
  • cpe:2.3:o:redhat:enterprise_linux_eus:9.6:*:*:*:*:*:*:*
  • cpe:2.3:o:redhat:enterprise_linux_eus:10.0:*:*:*:*:*:*:*
  • cpe:2.3:o:redhat:enterprise_linux_tus:8.6:*:*:*:*:*:*:*
  • cpe:2.3:o:redhat:enterprise_linux_tus:8.8:*:*:*:*:*:*:*
  • cpe:2.3:o:redhat:enterprise_linux_update_services_for_sap_solutions:8.6:*:*:*:*:*:*:*
  • cpe:2.3:o:redhat:enterprise_linux_update_services_for_sap_solutions:8.8:*:*:*:*:*:*:*
  • cpe:2.3:o:redhat:enterprise_linux_update_services_for_sap_solutions:9.0:*:*:*:*:*:*:*
  • cpe:2.3:o:redhat:enterprise_linux_update_services_for_sap_solutions:9.2:*:*:*:*:*:*:*