CVE-2026-47770: CWE-674: Uncontrolled Recursion in jqlang jq
jq versions prior to 1.8.2 contain an uncontrolled recursion vulnerability in the comparison of deeply nested arrays using the == operator. This flaw causes exhaustion of the C stack, resulting in a denial of service via stack overflow. The issue arises from recursive structural comparison functions lacking proper recursion guards. The vulnerability is fixed in version 1.8.2.
AI Analysis
Technical Summary
The jq command-line JSON processor has a vulnerability (CVE-2026-47770) involving uncontrolled recursion in its recursive structural comparison code. When comparing two sufficiently deeply nested arrays with the == operator, the recursion through functions jvp_array_equal() and jv_equal() in src/jv.c causes stack exhaustion and a crash. A related recursion path through jv_cmp() in src/jv_aux.c also leads to stack overflow at higher nesting depths. This vulnerability can be triggered by processing attacker-controlled deeply nested JSON data or embedding jq where untrusted data reaches the comparison path. The issue is resolved in jq version 1.8.2.
Potential Impact
Exploitation of this vulnerability results in denial of service due to stack exhaustion and crash of the jq process. This can disrupt workflows or services relying on jq for JSON processing when handling deeply nested arrays, especially if the input is attacker-controlled. There is no indication of code execution or data corruption beyond denial of service.
Mitigation Recommendations
Upgrade jq to version 1.8.2 or later, where this uncontrolled recursion vulnerability has been fixed. Until upgrading, avoid processing untrusted deeply nested JSON arrays with the == operator in jq. Patch status is confirmed fixed in 1.8.2.
CVE-2026-47770: CWE-674: Uncontrolled Recursion in jqlang jq
Description
jq versions prior to 1.8.2 contain an uncontrolled recursion vulnerability in the comparison of deeply nested arrays using the == operator. This flaw causes exhaustion of the C stack, resulting in a denial of service via stack overflow. The issue arises from recursive structural comparison functions lacking proper recursion guards. The vulnerability is fixed in version 1.8.2.
CVSS v4.0
Score 6.8medium
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
The jq command-line JSON processor has a vulnerability (CVE-2026-47770) involving uncontrolled recursion in its recursive structural comparison code. When comparing two sufficiently deeply nested arrays with the == operator, the recursion through functions jvp_array_equal() and jv_equal() in src/jv.c causes stack exhaustion and a crash. A related recursion path through jv_cmp() in src/jv_aux.c also leads to stack overflow at higher nesting depths. This vulnerability can be triggered by processing attacker-controlled deeply nested JSON data or embedding jq where untrusted data reaches the comparison path. The issue is resolved in jq version 1.8.2.
Potential Impact
Exploitation of this vulnerability results in denial of service due to stack exhaustion and crash of the jq process. This can disrupt workflows or services relying on jq for JSON processing when handling deeply nested arrays, especially if the input is attacker-controlled. There is no indication of code execution or data corruption beyond denial of service.
Mitigation Recommendations
Upgrade jq to version 1.8.2 or later, where this uncontrolled recursion vulnerability has been fixed. Until upgrading, avoid processing untrusted deeply nested JSON arrays with the == operator in jq. Patch status is confirmed fixed in 1.8.2.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-05-19T22:36:16.882Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a3d65db4853345fc13feb03
Added to database: 06/25/2026, 17:31:07 UTC
Last enriched: 06/25/2026, 17:46:04 UTC
Last updated: 06/25/2026, 18:10:30 UTC
Views: 4
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.