CVE-2026-39979: CWE-125: Out-of-bounds Read in jqlang jq
jq is a command-line JSON processor. In commits before 2f09060afab23fe9390cce7cb860b10416e1bf5f, the jv_parse_sized() API in libjq accepts a counted buffer with an explicit length parameter, but its error-handling path formats the input buffer using %s in jv_string_fmt(), which reads until a NUL terminator is found rather than respecting the caller-supplied length. This means that when malformed JSON is passed in a non-NUL-terminated buffer, the error construction logic performs an out-of-bounds read past the end of the buffer. The vulnerability is reachable by any libjq consumer calling jv_parse_sized() with untrusted input, and depending on memory layout, can result in memory disclosure or process termination. The issue has been patched in commit 2f09060afab23fe9390cce7cb860b10416e1bf5f.
AI Analysis
Technical Summary
jq is a command-line JSON processor. Prior to commit 2f09060afab23fe9390cce7cb860b10416e1bf5f, the jv_parse_sized() API in libjq accepts a counted buffer with an explicit length parameter but its error-handling path formats the input buffer using %s in jv_string_fmt(), which reads until a NUL terminator is found rather than respecting the caller-supplied length. This causes an out-of-bounds read past the end of the buffer when malformed JSON is passed in a non-NUL-terminated buffer. The vulnerability is reachable by any libjq consumer calling jv_parse_sized() with untrusted input and can result in memory disclosure or process termination depending on memory layout. 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. The CVSS 4.0 base score is 6.9 (medium severity), indicating a moderate impact with network attack vector, low complexity, no privileges or user interaction required, and limited confidentiality and availability impact.
Mitigation Recommendations
A patch fixing this vulnerability is available in commit 2f09060afab23fe9390cce7cb860b10416e1bf5f. Users and vendors consuming libjq should update to versions including this commit. Red Hat advisories reference fixes in their packages; users of affected Red Hat products should apply the relevant security updates as provided in the Red Hat errata. Patch status is confirmed by vendor advisories. No additional mitigations are specified beyond applying the official fix.
CVE-2026-39979: CWE-125: Out-of-bounds Read in jqlang jq
Description
jq is a command-line JSON processor. In commits before 2f09060afab23fe9390cce7cb860b10416e1bf5f, the jv_parse_sized() API in libjq accepts a counted buffer with an explicit length parameter, but its error-handling path formats the input buffer using %s in jv_string_fmt(), which reads until a NUL terminator is found rather than respecting the caller-supplied length. This means that when malformed JSON is passed in a non-NUL-terminated buffer, the error construction logic performs an out-of-bounds read past the end of the buffer. The vulnerability is reachable by any libjq consumer calling jv_parse_sized() with untrusted input, and depending on memory layout, can result in memory disclosure or process termination. The issue has been patched in commit 2f09060afab23fe9390cce7cb860b10416e1bf5f.
CVSS v4.0
Score 6.9medium
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
jq is a command-line JSON processor. Prior to commit 2f09060afab23fe9390cce7cb860b10416e1bf5f, the jv_parse_sized() API in libjq accepts a counted buffer with an explicit length parameter but its error-handling path formats the input buffer using %s in jv_string_fmt(), which reads until a NUL terminator is found rather than respecting the caller-supplied length. This causes an out-of-bounds read past the end of the buffer when malformed JSON is passed in a non-NUL-terminated buffer. The vulnerability is reachable by any libjq consumer calling jv_parse_sized() with untrusted input and can result in memory disclosure or process termination depending on memory layout. 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. The CVSS 4.0 base score is 6.9 (medium severity), indicating a moderate impact with network attack vector, low complexity, no privileges or user interaction required, and limited confidentiality and availability impact.
Mitigation Recommendations
A patch fixing this vulnerability is available in commit 2f09060afab23fe9390cce7cb860b10416e1bf5f. Users and vendors consuming libjq should update to versions including this commit. Red Hat advisories reference fixes in their packages; users of affected Red Hat products should apply the relevant security updates as provided in the Red Hat errata. Patch status is confirmed by vendor advisories. No additional mitigations are specified beyond applying the official 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
- Vendor Advisory Urls
- [{"url":"https://access.redhat.com/security/cve/CVE-2026-39979","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:26528","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:26542","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:23233","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:25044","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:25181","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:23245","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:16252","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:18048","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:18047","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:18046","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:18045","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:18044","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:18040","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:16692","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:19151","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:18043","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:18042","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:16693","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:19365","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:25096","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:30078","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:30089","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:30088","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:30087","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:8579","vendor":"Red Hat"}]
Threat ID: 69dd725c82d89c981f75a06a
Added to database: 04/13/2026, 22:46:52 UTC
Last enriched: 07/16/2026, 08:57:57 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 143
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.