Skip to main content

jq CVE-2026-32316

| EUVDEUVD-2026-22039 HIGH
Heap-based Buffer Overflow (CWE-122)
2026-04-13 GitHub_M
7.5
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit untrusted jq filter to service
  2. Delivery
    Craft query concatenating strings over 2^31 bytes
  3. Exploit
    Trigger 32-bit integer overflow in allocation
  4. Execution
    Oversized copy overflows undersized heap buffer
  5. Impact
    Process crash / heap corruption (DoS)

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Heap buffer bounds checking
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Two concrete prerequisites must both hold: (1) the target must evaluate attacker-controlled jq programs/filters on untrusted input (a service or pipeline exposing jq query evaluation - not a CLI run only against trusted scripts); and (2) the crafted query must produce concatenated strings whose combined length exceeds 2^31 bytes (~2GB), because the overflow is in a 32-bit unsigned size calculation. Limiting factors: the ~2GB string requirement demands significant attacker-supplied data and memory, making casual exploitation resource-heavy; jq used locally on trusted data is not remotely exploitable; and demonstrated impact is denial of service (process crash) - heap-corruption-to-code-execution is described only as a potential, not confirmed. Affected: jqlang/jq through 1.8.1 (fixed in commit e47e56d).

Impact

Signals are largely consistent and point to a genuine but moderate availability risk rather than a top-tier priority. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H, base 7.5) scores only availability impact, which matches the description's primary outcome (process crash via heap corruption). EPSS is very low (0.04%, 12th percentile) and the CVE is NOT on CISA KEV, so there is no evidence of widespread or active exploitation. SSVC reports Exploitation=poc (so publicly available exploit code exists), Automatable=yes, and Technical Impact=partial - the 'partial' rating aligns with the C:N/I:N/A:H impact (denial of service, not full compromise). The one point worth flagging: the vector's AC:L understates reality - triggering the overflow requires producing concatenated strings exceeding 2^31 bytes (~2GB), which demands substantial attacker-supplied data/memory and is non-trivial, arguing for higher attack complexity (see assessed vector). Also note AV:N applies only where jq evaluates untrusted queries over a network-exposed service; jq used purely as a local CLI on trusted scripts is not remotely reachable - verify your deployment model. The 'potential further exploitation through heap corruption' is explicitly speculative in the description and not reflected in the C/I metrics; treat code execution as unproven. Net: a real, patch-worthy DoS bug, but low urgency absent exposure of untrusted query evaluation.

Exploit ScenarioDerived

A network service that evaluates attacker-supplied jq filters (e.g., a JSON-transformation API or data pipeline) receives a crafted query that concatenates strings whose combined length exceeds 2^31 bytes. The 32-bit allocation-size calculation in jvp_string_append()/jvp_string_copy_replace_bad() overflows, a drastically undersized heap buffer is allocated, and the subsequent copy overflows the heap - crashing the process (DoS) and potentially corrupting heap metadata. Public exploit/POC code exists per the SSVC assessment, though exploitation requires generating ~2GB of string data.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – Oct 16, 2026

A heap-based buffer overflow in jqlang/jq through version 1.8.1 allows remote, unauthenticated attackers to crash - and potentially corrupt the heap of - any service that evaluates attacker-controlled jq programs, by supplying a filter that concatenates strings into a result exceeding 2^31 bytes. The overflow originates in a 32-bit unsigned size computation inside jv.c, so the buffer is allocated far too small and the subsequent copy writes past its end. Publicly available exploit code exists (CISA SSVC records Exploitation: poc), but EPSS is very low at 0.04% (12th percentile) and there is no CISA KEV confirmation of active exploitation; the assessed vector is AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H, reflecting that the ~2GB string prerequisite makes reliable exploitation resource-heavy and that demonstrated impact is denial of service, with code execution only a theoretical possibility.

Earlier versions of this analysis (1)
v1 Apr 15, 2026 - 12:32 CVSS 8.2

Heap buffer overflow in jq command-line JSON processor (all versions through 1.8.1) allows remote unauthenticated attackers to crash processes or potentially achieve code execution via crafted queries producing strings exceeding 2^31 bytes. Integer overflow in jvp_string_append() and jvp_string_copy_replace_bad() functions causes undersized buffer allocation followed by heap corruption. Publicly available exploit code exists (SSVC: POC). EPSS score of 0.04% (12th percentile) suggests low observed exploitation probability, though CVSS 8.2 reflects high availability impact and network exploitability without authentication. Critical for systems processing untrusted jq queries (API endpoints, data pipelines, automated JSON processing). Fixed in commit e47e56d226519635768e6aab2f38f0ab037c09e5.

RemediationAI

Apply the upstream fix by building or installing a jq version that includes commit e47e56d226519635768e6aab2f38f0ab037c09e5, which converts the length arithmetic to 64-bit and returns a "String too long" error rather than overflowing; because the fix is identified as a commit rather than a tagged release, confirm with your distribution's patched package - Ubuntu users should install the version referenced in USN-8202-1 and Debian LTS users the version from the October 2026 DLA - and treat upstream and distro advisories (GHSA-q3h9-m34w-h76f, EUVD-2026-22039) as the authoritative upgrade guidance. Where patching cannot be immediate, the highest-value compensating control is architectural: do not expose jq query/filter evaluation to untrusted parties, since the vulnerability requires the attacker to control the jq program itself, not merely the JSON input; if that exposure is unavoidable, impose a hard memory cap on the process (RLIMIT_AS/ulimit -v, cgroup memory limit, or container memory limit) below the 2GB threshold needed to trigger the 32-bit wrap - the trade-off is that large legitimate queries will fail or the process will be killed rather than gracefully erroring, but a controlled allocation failure prevents the heap corruption path. Additional containment: cap the size of any input document and any single generated string well below 2^31 bytes at the wrapper layer, reject filters that use unbounded join/add/string-repetition constructs on attacker-sized inputs, and run jq evaluation in a sandboxed, least-privilege process so that a crash or potential heap-corruption exploitation cannot escalate beyond that boundary.

Affected VersionsENISA

jq < e47e56d226519635768e6aab2f38f0ab037c09e5

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

jq is a widely deployed command-line JSON processor whose internals in src/jv.c implement a reference-counted jv value type and a growable string append mechanism. In jvp_string_copy_replace_bad(), the worst-case output length for UTF-8 repair (every bad byte replaced with the 3-byte U+FFFD sequence) was computed as uint32_t maxlength = length * 3 + 1, and in the string-append path the remaining-space calculation used 32-bit arithmetic as well. When the combined string length reaches or exceeds 2^31 bytes, that multiplication/addition wraps in 32-bit unsigned space, yielding a drastically undersized heap allocation; the follow-up memcpy then writes the full string data past the end of the buffer. This is CWE-190 (Integer Overflow or Wraparound) chaining into CWE-122 (Heap-based Buffer Overflow) - the same class of unchecked length arithmetic that arrays and objects in jq already guard against with explicit size limits, but which the string code path lacked. The upstream fix (commit e47e56d226519635768e6aab2f38f0ab037c09e5) widens the intermediate computation to uint64_t and adds an if (maxlength >= INT_MAX) / if ((uint64_t)currlen + len >= INT_MAX) guard that frees the value and returns a jv_invalid_with_msg("String too long") error instead of allocating.

Know when Jq gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 5.9 MEDIUM

Remote only where untrusted queries are evaluated (AV:N, PR:N); AC:H because triggering requires generating >2GB strings; impact is a crash, so A:H with C:N/I:N.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE 8.2 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
Red Hat 6.8 MEDIUM

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

4
Analysis Updated
Oct 16, 2026 - 23:28 vuln.today
v2 - CVSS changed
CVSS changed
Oct 16, 2026 - 23:25 NVD
8.2 (HIGH) 7.5 (HIGH)
Patch released
Apr 19, 2026 - 02:30 nvd
Patch available
CVE Published
Apr 13, 2026 - 17:49 nvd
HIGH 8.2

DescriptionNVD

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.

Executive ViewAI

Why It Matters

jqlang/jq versions up to 1.8.1 are vulnerable to a remote heap-based buffer overflow (CVE-2026-32316) that allows unauthenticated attackers to crash and potentially corrupt the heap of any service evaluating attacker-controlled jq programs. This threatens availability for organizations that use jq to process untrusted JSON filters, such as in API gateways, data pipelines, or multi-tenant environments. While no active exploitation has been confirmed, publicly available exploit code exists, making timely patching critical.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.0%
Top 88% exploitable
Prevalence
High
ubiquitous CLI JSON processor shipped in most Linux distributions and CI/container images
Social Media
2
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

A heap overflow occurs when a program writes data beyond the bounds of a buffer allocated in the heap memory region.

More in Jq

View all
CVE-2024-53427 HIGH POC
8.1 Feb 26

decNumberCopy in decNumber.c in jq through 1.7.1 does not properly consider that NaN is interpreted as numeric, which ha

CVE-2015-8863 CRITICAL
9.8 May 06

Off-by-one error in the tokenadd function in jv_parse.c in jq allows remote attackers to cause a denial of service (cras

CVE-2025-48060 HIGH POC
7.7 May 21

jq is a command-line JSON processor. Rated high severity (CVSS 7.7), this vulnerability is remotely exploitable, no auth

CVE-2016-4074 HIGH POC
7.5 May 06

The jv_dump_term function in jq 1.5 allows remote attackers to cause a denial of service (stack consumption and applicat

CVE-2023-49355 HIGH POC
7.5 Dec 11

decToString in decNumber/decNumber.c in jq 88f01a7 has a one-byte out-of-bounds write via the " []-1.2e-1111111111" inpu

CVE-2023-50268 MEDIUM POC
5.5 Dec 13

jq is a command-line JSON processor. Rated medium severity (CVSS 5.5), this vulnerability is low attack complexity. Publ

CVE-2023-50246 MEDIUM POC
5.5 Dec 13

jq is a command-line JSON processor. Rated medium severity (CVSS 5.5), this vulnerability is low attack complexity. Publ

CVE-2026-49839 HIGH
7.1

Out-of-bounds write in the jq command-line JSON processor (CWE-787) lets a crafted JSON input corrupt memory when parsed

CVE-2026-54679 MEDIUM
6.9

jq, the command-line JSON processor, was patched in Alpine Linux with package version 1.8.2-r0. The specific vulnerabili

CVE-2026-39979 MEDIUM
6.9 Apr 13

Out-of-bounds read in libjq's jv_parse_sized() API exposes any embedding application to memory disclosure or process ter

CVE-2026-47770 MEDIUM
6.8

jq on Alpine Linux was patched in package version 1.8.2-r0, addressing an unspecified vulnerability. The nature of the f

CVE-2026-41257 MEDIUM
6.4 May 11

Integer overflow in jq's bytecode VM data stack allocation tracking allows local attackers to corrupt heap memory and ac

Vendor StatusVendor

SUSE

Severity: High
Product Status
SLES15-SP5-CHOST-BYOS-SAP-CCloud Fixed
SLES15-SP6-CHOST-BYOS Fixed
SLES15-SP6-CHOST-BYOS-Aliyun Fixed
SLES15-SP6-CHOST-BYOS-Azure Fixed
SLES15-SP6-CHOST-BYOS-EC2 Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy