CVE-2026-41257: CWE-190: Integer Overflow or Wraparound in jqlang jq
jq is a command-line JSON processor. In 1.8.1 and earlier, the jq bytecode VM's data stack tracks its allocation size in a signed int. When the stack grows beyond ≈1 GiB (via deeply nested generator forks), the doubling arithmetic overflows. The wrapped value is passed to realloc and then used for a memmove with attacker-influenced offsets.
AI Analysis
Technical Summary
jq versions 1.8.1 and earlier contain an integer overflow in the bytecode VM's data stack allocation size tracking, which uses a signed int. When the stack grows beyond about 1 GiB due to deeply nested generator forks, the doubling calculation overflows and wraps the allocation size. This incorrect size is passed to realloc and subsequently used in a memmove operation with attacker-controlled offsets, potentially leading to memory corruption.
Potential Impact
The integer overflow can cause memory corruption due to incorrect memory allocation and copying operations. This may lead to undefined behavior, including crashes or potential exploitation scenarios. However, exploitation requires triggering deeply nested generator forks that cause the stack to grow beyond approximately 1 GiB. There are no known exploits in the wild at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, users should avoid processing JSON inputs that cause deeply nested generator forks leading to large stack growth. Monitor vendor communications for updates on patches or mitigations.
CVE-2026-41257: CWE-190: Integer Overflow or Wraparound in jqlang jq
Description
jq is a command-line JSON processor. In 1.8.1 and earlier, the jq bytecode VM's data stack tracks its allocation size in a signed int. When the stack grows beyond ≈1 GiB (via deeply nested generator forks), the doubling arithmetic overflows. The wrapped value is passed to realloc and then used for a memmove with attacker-influenced offsets.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
jq versions 1.8.1 and earlier contain an integer overflow in the bytecode VM's data stack allocation size tracking, which uses a signed int. When the stack grows beyond about 1 GiB due to deeply nested generator forks, the doubling calculation overflows and wraps the allocation size. This incorrect size is passed to realloc and subsequently used in a memmove operation with attacker-controlled offsets, potentially leading to memory corruption.
Potential Impact
The integer overflow can cause memory corruption due to incorrect memory allocation and copying operations. This may lead to undefined behavior, including crashes or potential exploitation scenarios. However, exploitation requires triggering deeply nested generator forks that cause the stack to grow beyond approximately 1 GiB. There are no known exploits in the wild at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, users should avoid processing JSON inputs that cause deeply nested generator forks leading to large stack growth. Monitor vendor communications for updates on patches or mitigations.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-18T14:01:46.801Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a021aa3cbff5d8610430382
Added to database: 5/11/2026, 6:06:27 PM
Last enriched: 5/11/2026, 6:24:02 PM
Last updated: 5/12/2026, 3:46:42 AM
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.