CVE-2026-40612: CWE-674: Uncontrolled Recursion in jqlang jq
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.
AI Analysis
Technical Summary
The vulnerability in jq (<= 1.8.1) involves the jv_contains function, which performs recursive checks into nested JSON arrays or objects without limiting recursion depth. Because jq's JSON parser limits input depth to 10,000, this issue arises only with programmatically constructed nested structures using reduce. The uncontrolled recursion can exhaust the C stack, potentially causing a denial of service due to application crash. The CVSS 4.0 base score is 5.4, reflecting a medium severity with local attack vector and no privileges required but user interaction necessary.
Potential Impact
Exploitation of this vulnerability can cause jq to crash by exhausting the C stack when processing deeply nested JSON structures. This results in a denial of service condition. There is no indication of code execution or data corruption beyond service interruption. No known exploits are reported in the wild.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid processing JSON inputs with extremely deep nesting created programmatically. Monitor jq releases for updates addressing this issue.
CVE-2026-40612: CWE-674: Uncontrolled Recursion in jqlang jq
Description
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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in jq (<= 1.8.1) involves the jv_contains function, which performs recursive checks into nested JSON arrays or objects without limiting recursion depth. Because jq's JSON parser limits input depth to 10,000, this issue arises only with programmatically constructed nested structures using reduce. The uncontrolled recursion can exhaust the C stack, potentially causing a denial of service due to application crash. The CVSS 4.0 base score is 5.4, reflecting a medium severity with local attack vector and no privileges required but user interaction necessary.
Potential Impact
Exploitation of this vulnerability can cause jq to crash by exhausting the C stack when processing deeply nested JSON structures. This results in a denial of service condition. There is no indication of code execution or data corruption beyond service interruption. No known exploits are reported in the wild.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid processing JSON inputs with extremely deep nesting created programmatically. Monitor jq releases for updates addressing this issue.
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: 5/11/2026, 6:06:27 PM
Last enriched: 5/11/2026, 6:24:20 PM
Last updated: 5/12/2026, 3:40:22 AM
Views: 5
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.