CVE-2026-33947: CWE-674: Uncontrolled Recursion in jqlang jq
jq is a command-line JSON processor. In versions 1.8.1 and below, functions jv_setpath(), jv_getpath(), and delpaths_sorted() in jq's src/jv_aux.c use unbounded recursion whose depth is controlled by the length of a caller-supplied path array, with no depth limit enforced. An attacker can supply a JSON document containing a flat array of ~65,000 integers (~200 KB) that, when used as a path argument by a trusted jq filter, exhausts the C call stack and crashes the process with a segmentation fault (SIGSEGV). This bypass works because the existing MAX_PARSING_DEPTH (10,000) limit only protects the JSON parser, not runtime path operations where arrays can be programmatically constructed to arbitrary lengths. The impact is denial of service (unrecoverable crash) affecting any application or service that processes untrusted JSON input through jq's setpath, getpath, or delpaths builtins. This issue has been addressed in commit fb59f1491058d58bdc3e8dd28f1773d1ac690a1f.
AI Analysis
Technical Summary
The jq JSON processor versions up to 1.8.1 have a vulnerability (CWE-674) involving unbounded recursion in the functions jv_setpath(), jv_getpath(), and delpaths_sorted() located in src/jv_aux.c. These functions recursively process path arrays without enforcing a maximum recursion depth, allowing an attacker to supply a JSON document with a very large flat array (~65,000 integers) as a path argument. This causes the C call stack to overflow, crashing the jq process with a segmentation fault (SIGSEGV). The existing MAX_PARSING_DEPTH limit of 10,000 only protects the JSON parser stage, not these runtime path operations, enabling this denial of service. The vulnerability is addressed in commit fb59f1491058d58bdc3e8dd28f1773d1ac690a1f.
Potential Impact
Successful exploitation causes an unrecoverable crash of the jq process due to stack exhaustion, resulting in denial of service. There is no impact on confidentiality or integrity. Any application or service that uses vulnerable jq versions to process untrusted JSON input with the affected builtins is susceptible to this denial of service.
Mitigation Recommendations
A fix is available in jq at commit fb59f1491058d58bdc3e8dd28f1773d1ac690a1f. Users should upgrade jq to a version including this commit or later to remediate this vulnerability. Patch status is not explicitly stated in vendor advisories here, so verify the vendor's official release notes for the fixed version. Until patched, avoid processing untrusted JSON input with the affected jq functions.
CVE-2026-33947: CWE-674: Uncontrolled Recursion in jqlang jq
Description
jq is a command-line JSON processor. In versions 1.8.1 and below, functions jv_setpath(), jv_getpath(), and delpaths_sorted() in jq's src/jv_aux.c use unbounded recursion whose depth is controlled by the length of a caller-supplied path array, with no depth limit enforced. An attacker can supply a JSON document containing a flat array of ~65,000 integers (~200 KB) that, when used as a path argument by a trusted jq filter, exhausts the C call stack and crashes the process with a segmentation fault (SIGSEGV). This bypass works because the existing MAX_PARSING_DEPTH (10,000) limit only protects the JSON parser, not runtime path operations where arrays can be programmatically constructed to arbitrary lengths. The impact is denial of service (unrecoverable crash) affecting any application or service that processes untrusted JSON input through jq's setpath, getpath, or delpaths builtins. This issue has been addressed in commit fb59f1491058d58bdc3e8dd28f1773d1ac690a1f.
CVSS v3.1
Score 6.2medium
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The jq JSON processor versions up to 1.8.1 have a vulnerability (CWE-674) involving unbounded recursion in the functions jv_setpath(), jv_getpath(), and delpaths_sorted() located in src/jv_aux.c. These functions recursively process path arrays without enforcing a maximum recursion depth, allowing an attacker to supply a JSON document with a very large flat array (~65,000 integers) as a path argument. This causes the C call stack to overflow, crashing the jq process with a segmentation fault (SIGSEGV). The existing MAX_PARSING_DEPTH limit of 10,000 only protects the JSON parser stage, not these runtime path operations, enabling this denial of service. The vulnerability is addressed in commit fb59f1491058d58bdc3e8dd28f1773d1ac690a1f.
Potential Impact
Successful exploitation causes an unrecoverable crash of the jq process due to stack exhaustion, resulting in denial of service. There is no impact on confidentiality or integrity. Any application or service that uses vulnerable jq versions to process untrusted JSON input with the affected builtins is susceptible to this denial of service.
Mitigation Recommendations
A fix is available in jq at commit fb59f1491058d58bdc3e8dd28f1773d1ac690a1f. Users should upgrade jq to a version including this commit or later to remediate this vulnerability. Patch status is not explicitly stated in vendor advisories here, so verify the vendor's official release notes for the fixed version. Until patched, avoid processing untrusted JSON input with the affected jq functions.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-03-24T19:50:52.105Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69dd67d182d89c981f6a0134
Added to database: 4/13/2026, 10:01:53 PM
Last enriched: 4/21/2026, 6:02:32 AM
Last updated: 5/29/2026, 4:58:52 AM
Views: 74
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.
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.