Skip to main content
Public proof of conceptFix available

CVE-2026-32316

jq: Integer overflow in jvp_string_append() allows Heap-based Buffer Overflow

A public proof of concept exists; no exploitation attested.

  • Published2026-04-13
  • WeaknessCWE-122 · CWE-190

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

Description

jq is a command-line JSON processor. An integer overflow vulnerability exists through version 1.8.1 within the jvp_string_append() and jvp_string_copy_replace_bad functions, where concatenating strings with a combined length exceeding 2^31 bytes causes a 32-bit unsigned integer overflow in the buffer allocation size calculation, resulting in a drastically undersized heap buffer. Subsequent memory copy operations then write the full string data into this undersized buffer, causing a heap buffer overflow classified as CWE-190 (Integer Overflow) leading to CWE-122 (Heap-based Buffer Overflow). Any system evaluating untrusted jq queries is affected, as an attacker can crash the process or potentially achieve further exploitation through heap corruption by crafting queries that produce extremely large strings. The root cause is the absence of string size bounds checking, unlike arrays and objects which already have size limits. The issue has been addressed in commit e47e56d226519635768e6aab2f38f0ab037c09e5.

Timeline

dates in UTC
  1. 2026-04-1318:16CVE publishedNVD

Versions per branch

NVD
Jqlang jq
BranchAffectedFixed in
1.8≤ 1.8.1no fix published

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As GitHub_M, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • jqlang jq
    Affected
    • = < e47e56d226519635768e6aab2f38f0ab037c09e5no fix stated

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2026-04-13

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • jqWolfiall versions · fixed in 1.8.1-r5
  • jqUbuntu:Pro:20.04:LTSall versions · fixed in 1.6-1ubuntu0.20.04.1+esm2
  • jqUbuntu:Pro:18.04:LTSall versions · fixed in 1.5+dfsg-2ubuntu0.1~esm2
  • jqUbuntu:Pro:16.04:LTSall versions · fixed in 1.5+dfsg-1ubuntu0.1+esm4
  • jqUbuntu:Pro:14.04:LTSall versions · fixed in 1.3-1.1ubuntu1.1+esm4
  • jqUbuntu:26.04:LTSall versions · fixed in 1.8.1-4ubuntu2
  • jqUbuntu:25.10all versions · fixed in 1.8.1-3ubuntu1.1
  • jqUbuntu:24.04:LTSall versions · fixed in 1.7.1-3ubuntu0.24.04.2

36 more package ranges on OSV.dev

Vendor advisories

  • CVE-2026-32316 Red Hat Product Security5 products fixed · 12 known affected

    jq: jq: Denial of Service or potential arbitrary code execution due to integer overflow and heap-based buffer overflow

    automation-controller.src as a component of Red Hat Ansible Automation Platform 2 · redhat-user-workloads/controller-rhel9 as a component of Red Hat Ansible Automation Platform 2 · redhat-user-workloads/hub-rhel9 as a component of Red Hat Ansible Automation Platform 2 · +9 more

  • RHSA-2026:8579 Red Hat Product Security5 products fixed

    Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update

Full record on NVD

Fix

  1. Vendor fix Red Hat Product Security RHSA-2026:8579 · 5 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://images.redhat.com/
  2. Workaround from the vendor Red Hat Product Security RHSA-2026:8579 · 5 productsTo mitigate this issue, avoid processing untrusted or unvalidated JSON input with the `jq` utility. Ensure that any scripts or automated processes utilizing `jq` only operate on trusted data sources. Restricting the execution of `jq` to trusted users and environments can also reduce exposure.
  3. No fix available, says the vendor Red Hat Product Security CVE-2026-32316 · 12 productsFix deferred

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

  • CISA-ADPSSVC decisionpoc2026-04-13
  • CNACVSS 3.18.2known since 2026-10-27
  • NVDCVSS 3.17.5read 2026-10-27
  • CNAweakness (CWE)CWE-122, CWE-190known since 2026-10-27
  • FIRST EPSSEPSS score0.8 %2026-11-18
  • OSVaffected packages—
  • Microsoft MSRCadvisory—

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Published
2026-04-13
Last Modified
2026-10-26
NVD status
Modified
MSRC Title
jq: Integer overflow in jvp_string_append() allows Heap-based Buffer Overflow

Frequently asked questions

What is CVE-2026-32316?

jq is a command-line JSON processor. An integer overflow vulnerability exists through version 1.8.1 within the jvp_string_append() and jvp_string_copy_replace_bad functions, where concatenating strings with a combined length exceeding 2^31 bytes causes a 32-bit unsigned integer overflow in the buffer allocation size calculation, resulting in a drastically undersized heap buffer. Subsequent memory copy operations then write the full string data into this undersized buffer, causing a heap buffer overflow classified as CWE-190 (Integer Overflow) leading to CWE-122 (Heap-based Buffer Overflow). Any system evaluating untrusted jq queries is affected, as an attacker can crash the process or potentially achieve further exploitation through heap corruption by crafting queries that produce extremely large strings. The root cause is the absence of string size bounds checking, unlike arrays and objects which already have size limits. The issue has been addressed in commit e47e56d226519635768e6aab2f38f0ab037c09e5.

Is CVE-2026-32316 actively exploited?

A proof-of-concept exploit exists for CVE-2026-32316, but active exploitation has not been confirmed at this time.

What is the CVSS score for CVE-2026-32316?

CVE-2026-32316 has a CVSS v3 base score of 7.5 (HIGH severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.

Running jq? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record