CVE-2026-39979: CWE-125: Out-of-bounds Read in jqlang jq
CVE-2026-39979 is an out-of-bounds read vulnerability in the jq command-line JSON processor's libjq component. The issue occurs in the jv_parse_sized() API before commit 2f09060afab23fe9390cce7cb860b10416e1bf5f, where error-handling code improperly reads beyond the provided buffer length when processing malformed JSON in a non-NUL-terminated buffer. This can lead to memory disclosure or process termination depending on memory layout. The vulnerability affects all libjq consumers calling jv_parse_sized() with untrusted input. A patch fixing this issue has been committed.
AI Analysis
Technical Summary
jq is a JSON processor whose libjq library includes the jv_parse_sized() API that accepts a buffer with an explicit length. Before commit 2f09060afab23fe9390cce7cb860b10416e1bf5f, the error-handling path formats the input buffer using %s in jv_string_fmt(), which reads until a NUL terminator rather than respecting the supplied length. When malformed JSON is passed in a non-NUL-terminated buffer, this causes an out-of-bounds read beyond the buffer end. This vulnerability can be triggered by any libjq consumer using jv_parse_sized() with untrusted input and may result in memory disclosure or process termination. The issue has been patched in the referenced commit.
Potential Impact
The vulnerability allows an out-of-bounds read when processing malformed JSON in non-NUL-terminated buffers, potentially leading to memory disclosure or process termination. This impacts any application using libjq's jv_parse_sized() API with untrusted input. There are no known exploits in the wild at this time.
Mitigation Recommendations
A patch fixing this vulnerability has been committed in jq at commit 2f09060afab23fe9390cce7cb860b10416e1bf5f. Users and developers should upgrade to this version or later to remediate the issue. Since this is not a cloud service, remediation depends on applying the patch. Patch status is not explicitly stated beyond the commit; verify with the vendor or official jq repository for the latest release containing this fix.
CVE-2026-39979: CWE-125: Out-of-bounds Read in jqlang jq
Description
CVE-2026-39979 is an out-of-bounds read vulnerability in the jq command-line JSON processor's libjq component. The issue occurs in the jv_parse_sized() API before commit 2f09060afab23fe9390cce7cb860b10416e1bf5f, where error-handling code improperly reads beyond the provided buffer length when processing malformed JSON in a non-NUL-terminated buffer. This can lead to memory disclosure or process termination depending on memory layout. The vulnerability affects all libjq consumers calling jv_parse_sized() with untrusted input. A patch fixing this issue has been committed.
CVSS v4.0
Score 6.9medium
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
jq is a JSON processor whose libjq library includes the jv_parse_sized() API that accepts a buffer with an explicit length. Before commit 2f09060afab23fe9390cce7cb860b10416e1bf5f, the error-handling path formats the input buffer using %s in jv_string_fmt(), which reads until a NUL terminator rather than respecting the supplied length. When malformed JSON is passed in a non-NUL-terminated buffer, this causes an out-of-bounds read beyond the buffer end. This vulnerability can be triggered by any libjq consumer using jv_parse_sized() with untrusted input and may result in memory disclosure or process termination. The issue has been patched in the referenced commit.
Potential Impact
The vulnerability allows an out-of-bounds read when processing malformed JSON in non-NUL-terminated buffers, potentially leading to memory disclosure or process termination. This impacts any application using libjq's jv_parse_sized() API with untrusted input. There are no known exploits in the wild at this time.
Mitigation Recommendations
A patch fixing this vulnerability has been committed in jq at commit 2f09060afab23fe9390cce7cb860b10416e1bf5f. Users and developers should upgrade to this version or later to remediate the issue. Since this is not a cloud service, remediation depends on applying the patch. Patch status is not explicitly stated beyond the commit; verify with the vendor or official jq repository for the latest release containing this fix.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-08T00:01:47.628Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69dd725c82d89c981f75a06a
Added to database: 4/13/2026, 10:46:52 PM
Last enriched: 4/21/2026, 6:22:00 AM
Last updated: 5/29/2026, 4:46:53 AM
Views: 82
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.