Skip to main content

jq CVE-2026-40612

| EUVDEUVD-2026-29161 MEDIUM
Uncontrolled Recursion (CWE-674)
2026-05-11 GitHub_M
5.4
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Craft deeply nested JSON structure
  2. Delivery
    Deliver malicious input to jq process
  3. Exploit
    Invoke contains filter or recursive function
  4. Execution
    Recursion exhausts C stack without limit check
  5. Persist
    Stack overflow causes process crash
  6. Impact
    Denial of service

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Recursion depth limits
Exploitation Conditions

The vulnerability requires that a user or automated process executes jq with a filter that invokes jv_contains (such as the contains function) against JSON input with nesting depth substantially exceeding 10,000 levels. The deep nesting must be constructed programmatically (e.g., via jq's reduce operator or by loading externally-built JSON structures) because jq's JSON parser itself limits depth to 10,000. No authentication is required, and the vulnerability affects default jq installations. The primary limiting condition is user interaction-an attacker must supply or convince a user to process the malicious input. Exploitation is not possible against genuinely untrusted JSON if jq's parser depth limit is the sole gateway; however, if jq is used in a pipeline where the input is pre-parsed or built via jq operations, the depth limit is bypassed.

Impact

CVSS 5.4 with CVSS:4.0 vector indicates low attack complexity (AC:L) and local attack vector (AV:L), requiring user interaction (UI:P). The vulnerability has high availability impact (VA:H) but no confidentiality or integrity impact. EPSS is marked as present (E:P), suggesting non-negligible exploitation probability. The primary limiting factor is local access and user interaction-the attacker must convince a user to process a malicious JSON file or provide input to jq. The absence of network vector and requirement for user participation substantially reduces real-world risk compared to the raw CVSS score. This is a denial-of-service vulnerability with practical impact primarily in scenarios where jq processes untrusted JSON input from external sources or where an attacker has local access to the system. The Information Disclosure tag in metadata is incongruent with the CVSS impact scores (which indicate availability, not confidentiality) and may reflect metadata inconsistency; the core threat is availability loss.

Exploit ScenarioDerived

An attacker crafts a JSON file with deeply nested objects or arrays exceeding 10,000 levels (possible via programmatic construction with reduce, bypassing parser limits) and tricks a user into processing it with jq using a filter like contains(). Alternatively, an attacker with local access runs jq directly against the malicious input. The jq process enters unbounded recursion, exhausts the stack, and crashes with a segmentation fault or stack overflow exception, disrupting the user's work or crashing batch processing systems.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.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

AnalysisAIv1 – May 11, 2026

jq 1.8.1 and earlier are vulnerable to stack exhaustion via unbounded recursion in the jv_contains function when processing deeply nested JSON structures. An attacker can craft a malicious JSON input with excessive nesting depth that exhausts the C stack, causing denial of service. The vulnerability requires user interaction to process the malicious input, and CVSS indicates availability impact with exploitability probability.

RemediationAI

Upgrade jq to version 1.8.2 or later when released by the jqlang project. Check the GitHub repository (https://github.com/jqlang/jq) for the latest stable release. Until patching is possible, apply strict input validation to reject JSON structures with nesting depth exceeding a safe threshold (e.g., 100-500 levels depending on system stack size) before passing them to jq. Deploy jq in restrictive execution environments (containers with reduced stack size, seccomp profiles limiting recursion) to limit the blast radius of stack exhaustion. Avoid exposing jq as a public-facing service that processes untrusted JSON; if unavoidable, implement a timeout and resource limit wrapper around jq execution to kill processes that consume excessive CPU or trigger stack exceptions.

Affected VersionsENISA

jq ≤ 1.8.1

Affected Packages

euvd jq no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

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

Technical ContextAI · show details

jq is a lightweight command-line JSON processor implemented in C. The vulnerability lies in the jv_contains function, which recursively traverses nested arrays and objects without enforcing a depth limit. While the JSON parser itself has a safeguard capping nesting depth at 10,000 levels, the jv_contains function can be called programmatically (e.g., via reduce operations) to operate on data structures that exceed this depth. Each recursive call consumes stack space without intermediate checks, leading to stack overflow when processing sufficiently deep structures. This is a classic unbounded recursion flaw (CWE-674) where the recursive descent lacks termination or depth-limiting logic.

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

Vendor (GitHub_M) PRIMARY 5.4 MEDIUM
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:P
SUSE 6.6 MEDIUM
AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H
Red Hat 5.5 MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
CVSS changed
May 11, 2026 - 18:22 NVD
5.4 (MEDIUM)
CVE Published
May 11, 2026 - 17:16 nvd
MEDIUM 5.4

DescriptionCVE.org

jq is a command-line JSON processor. In 1.8.1 and earlier, jv_contains recurses into nested arrays/objects with no depth limit. With a sufficiently nested input structure (built programmatically with reduce, since the JSON parser caps at depth 10000), the C stack is exhausted.

Threat Intelligence Overview

EPSS Score
0.0%
Top 97% exploitable
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment MSRC Vendor 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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

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

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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-32316 HIGH
7.5 Apr 13

A heap-based buffer overflow in jqlang/jq through version 1.8.1 allows remote, unauthenticated attackers to crash - and

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

Vendor StatusVendor

SUSE

Severity: Medium
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