CVE-2026-40612: CWE-674: Uncontrolled Recursion in jqlang jq
CVE-2026-40612 is a medium severity vulnerability in jq (version 1.8.1 and earlier) where the function jv_contains performs uncontrolled recursion into nested JSON arrays or objects without a depth limit. This can lead to exhaustion of the C stack when processing sufficiently deeply nested input structures, causing a denial of service. The vulnerability arises because jq's JSON parser limits nesting depth to 10,000, but programmatically constructed inputs using reduce can exceed this, triggering the recursion issue.
AI Analysis
Technical Summary
jq is a command-line JSON processor. In versions 1.8.1 and earlier, the jv_contains function recursively traverses nested arrays and objects without limiting recursion depth. When presented with a deeply nested JSON structure (beyond the parser's 10,000 depth limit, achievable via programmatic construction), this uncontrolled recursion exhausts the C stack, leading to a crash or denial of service. The CVSS 4.0 base score is 5.4 (medium severity), reflecting local attack vector, low complexity, no privileges required, user interaction needed, and high impact on availability.
Potential Impact
An attacker who can supply or influence the input JSON to jq can cause the application to crash by exhausting the C stack through deeply nested structures. This results in denial of service but does not indicate code execution or data disclosure. The impact is limited to availability degradation of jq when processing maliciously crafted JSON inputs.
Mitigation Recommendations
Patch status is not yet confirmed — no official fix or patch is currently available as per the vendor advisory. Users should monitor the vendor's announcements for updates. Until a fix is released, avoid processing untrusted or programmatically deeply nested JSON inputs with jq versions 1.8.1 or earlier to mitigate risk.
CVE-2026-40612: CWE-674: Uncontrolled Recursion in jqlang jq
Description
CVE-2026-40612 is a medium severity vulnerability in jq (version 1.8.1 and earlier) where the function jv_contains performs uncontrolled recursion into nested JSON arrays or objects without a depth limit. This can lead to exhaustion of the C stack when processing sufficiently deeply nested input structures, causing a denial of service. The vulnerability arises because jq's JSON parser limits nesting depth to 10,000, but programmatically constructed inputs using reduce can exceed this, triggering the recursion issue.
CVSS v4.0
Score 5.4medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
jq is a command-line JSON processor. In versions 1.8.1 and earlier, the jv_contains function recursively traverses nested arrays and objects without limiting recursion depth. When presented with a deeply nested JSON structure (beyond the parser's 10,000 depth limit, achievable via programmatic construction), this uncontrolled recursion exhausts the C stack, leading to a crash or denial of service. The CVSS 4.0 base score is 5.4 (medium severity), reflecting local attack vector, low complexity, no privileges required, user interaction needed, and high impact on availability.
Potential Impact
An attacker who can supply or influence the input JSON to jq can cause the application to crash by exhausting the C stack through deeply nested structures. This results in denial of service but does not indicate code execution or data disclosure. The impact is limited to availability degradation of jq when processing maliciously crafted JSON inputs.
Mitigation Recommendations
Patch status is not yet confirmed — no official fix or patch is currently available as per the vendor advisory. Users should monitor the vendor's announcements for updates. Until a fix is released, avoid processing untrusted or programmatically deeply nested JSON inputs with jq versions 1.8.1 or earlier to mitigate risk.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-14T14:07:59.642Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a021aa3cbff5d861043037c
Added to database: 05/11/2026, 18:06:27 UTC
Last enriched: 06/03/2026, 21:13:33 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 83
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.