CVE-2026-33947: CWE-674: Uncontrolled Recursion in jqlang jq
jq versions 1. 8. 1 and below contain an uncontrolled recursion vulnerability in functions jv_setpath(), jv_getpath(), and delpaths_sorted() due to unbounded recursion based on caller-supplied path arrays. An attacker can craft a JSON document with a large flat array (~65,000 integers) that causes jq to exhaust the C call stack and crash with a segmentation fault. This leads to a denial of service affecting applications that process untrusted JSON input using these jq builtins. The issue is fixed in commit fb59f1491058d58bdc3e8dd28f1773d1ac690a1f.
AI Analysis
Technical Summary
The vulnerability in jq (CVE-2026-33947) arises from unbounded recursion in the jv_setpath(), jv_getpath(), and delpaths_sorted() functions within src/jv_aux.c. These functions use recursion depth controlled by the length of a path array supplied by the caller, but no explicit limit is enforced on this depth. Although jq enforces a MAX_PARSING_DEPTH of 10,000 during JSON parsing, this limit does not apply to runtime path operations, allowing attackers to supply very large path arrays programmatically. By providing a JSON document containing a flat array of approximately 65,000 integers (~200 KB), an attacker can cause jq to exhaust the C call stack, resulting in a segmentation fault (SIGSEGV) and process crash. This vulnerability leads to denial of service in any application or service that uses jq's setpath, getpath, or delpaths builtins on untrusted JSON input. The issue has been 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. The vulnerability affects any application or service that processes untrusted JSON input using the affected jq builtins. No known exploits in the wild have been reported.
Mitigation Recommendations
A fix for this vulnerability is available in jq as of commit fb59f1491058d58bdc3e8dd28f1773d1ac690a1f. Users should upgrade jq to a version including this commit or later to remediate the issue. Patch status is not explicitly stated in the advisory, so confirm the presence of this commit in your jq version. Until patched, avoid processing untrusted JSON input with jq functions jv_setpath(), jv_getpath(), and delpaths_sorted() or apply input validation to limit path array sizes.
CVE-2026-33947: CWE-674: Uncontrolled Recursion in jqlang jq
Description
jq versions 1. 8. 1 and below contain an uncontrolled recursion vulnerability in functions jv_setpath(), jv_getpath(), and delpaths_sorted() due to unbounded recursion based on caller-supplied path arrays. An attacker can craft a JSON document with a large flat array (~65,000 integers) that causes jq to exhaust the C call stack and crash with a segmentation fault. This leads to a denial of service affecting applications that process untrusted JSON input using these jq builtins. The issue is fixed in commit fb59f1491058d58bdc3e8dd28f1773d1ac690a1f.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in jq (CVE-2026-33947) arises from unbounded recursion in the jv_setpath(), jv_getpath(), and delpaths_sorted() functions within src/jv_aux.c. These functions use recursion depth controlled by the length of a path array supplied by the caller, but no explicit limit is enforced on this depth. Although jq enforces a MAX_PARSING_DEPTH of 10,000 during JSON parsing, this limit does not apply to runtime path operations, allowing attackers to supply very large path arrays programmatically. By providing a JSON document containing a flat array of approximately 65,000 integers (~200 KB), an attacker can cause jq to exhaust the C call stack, resulting in a segmentation fault (SIGSEGV) and process crash. This vulnerability leads to denial of service in any application or service that uses jq's setpath, getpath, or delpaths builtins on untrusted JSON input. The issue has been 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. The vulnerability affects any application or service that processes untrusted JSON input using the affected jq builtins. No known exploits in the wild have been reported.
Mitigation Recommendations
A fix for this vulnerability is available in jq as of commit fb59f1491058d58bdc3e8dd28f1773d1ac690a1f. Users should upgrade jq to a version including this commit or later to remediate the issue. Patch status is not explicitly stated in the advisory, so confirm the presence of this commit in your jq version. Until patched, avoid processing untrusted JSON input with jq functions jv_setpath(), jv_getpath(), and delpaths_sorted() or apply input validation to limit path array sizes.
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/13/2026, 10:16:56 PM
Last updated: 4/14/2026, 8:13:19 AM
Views: 9
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.