CVE-2026-33948 jq: Embedded-NUL Truncation in CLI JSON Input Path Causes Prefix-Only Validation of Malformed Input
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: no · technical impact: partial
- Technology
- UbuntuDebianRed Hat
Description
jq is a command-line JSON processor. Commits before 6374ae0bcdfe33a18eb0ae6db28493b1f34a0a5b contain a vulnerability where CLI input parsing allows validation bypass via embedded NUL bytes. When reading JSON from files or stdin, jq uses strlen() to determine buffer length instead of the actual byte count from fgets(), causing it to truncate input at the first NUL byte and parse only the preceding prefix. This enables an attacker to craft input with a benign JSON prefix before a NUL byte followed by malicious trailing data, where jq validates only the prefix as valid JSON while silently discarding the suffix. Workflows relying on jq to validate untrusted JSON before forwarding it to downstream consumers are susceptible to parser differential attacks, as those consumers may process the full input including the malicious trailing bytes. This issue has been patched by commit 6374ae0bcdfe33a18eb0ae6db28493b1f34a0a5b.
Upgrade path
19 packages: 14 fixed, 5 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| redhat/jq(Red Hat enterprise_linux 10) | All versions | No fix listed | No fix yet |
| redhat/jq(Red Hat enterprise_linux 8) | All versions | No fix listed | No fix yet |
| redhat/jq(Red Hat enterprise_linux 9) | All versions | No fix listed | No fix yet |
| redhat/openshift/ose-rhel-coreos-8(Red Hat openshift 4) | All versions | No fix listed | No fix yet |
| redhat/openshift/ose-rhel-coreos-9(Red Hat openshift 4) | All versions | No fix listed | No fix yet |
| alpine/jq(Alpine v3.21) | < 1.8.2-r0 | 1.8.2-r0 | Fixed |
| alpine/jq(Alpine v3.22) | < 1.8.2-r0 | 1.8.2-r0 | Fixed |
| alpine/jq(Alpine v3.23) | < 1.8.2-r0 | 1.8.2-r0 | Fixed |
| alpine/jq(Alpine v3.24) | < 1.8.2-r0 | 1.8.2-r0 | Fixed |
| azure linux jq(Azure Linux 3.0) | < 1.7.1-5 | 1.7.1-5 | Fixed |
| cbl-mariner jq(CBL-Mariner 2.0) | < 1.6-6 | 1.6-6 | Fixed |
| debian/jq(Debian 12) | < 1.6-2.1+deb12u2; = 1.6-2.1; = 1.6-2.1+deb12u1 | 1.6-2.1+deb12u2 | Fixed |
| debian/jq(Debian 13) | < 1.7.1-6+deb13u2; = 1.7.1-6+deb13u1 | 1.7.1-6+deb13u2 | Fixed |
| debian/jq(Debian 14) | < 1.8.1-5; = 1.8.0-1; = 1.8.1-1; = 1.8.1-2 +2 more | 1.8.1-5 | Fixed |
| jqlang jq | < 1.8.2; = < 6374ae0bcdfe33a18eb0ae6db28493b1f34a0a5b | 1.8.2 | Fixed |
| redhat/jq-main(Red Hat hummingbird 1) | < 1.8.1-3.hum1 | 1.8.1-3.hum1 | Fixed |
| ubuntu/jq(Ubuntu 22.04) | < 1.6-2.1ubuntu3.2 | 1.6-2.1ubuntu3.2 | Fixed |
| ubuntu/jq(Ubuntu 24.04) | < 1.7.1-3ubuntu0.24.04.2 | 1.7.1-3ubuntu0.24.04.2 | Fixed |
| ubuntu/jq(Ubuntu 26.04) | < 1.8.1-4ubuntu2 | 1.8.1-4ubuntu2 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| cbl-mariner jq(CBL-Mariner:2.0) | < 1.6-6 | 1.6-6 |
| azure linux jq(Azure Linux:3.0) | < 1.7.1-5 | 1.7.1-5 |
| jqlang jq | = < 6374ae0bcdfe33a18eb0ae6db28493b1f34a0a5b | No fix listed |
| debian/jq(Debian:12) | < 1.6-2.1+deb12u2 | 1.6-2.1+deb12u2 |
| debian/jq(Debian:12) | = 1.6-2.1 | No fix listed |
| debian/jq(Debian:12) | = 1.6-2.1+deb12u1 | No fix listed |
| debian/jq(Debian:13) | < 1.7.1-6+deb13u2 | 1.7.1-6+deb13u2 |
| debian/jq(Debian:13) | = 1.7.1-6+deb13u1 | No fix listed |
| debian/jq(Debian:14) | < 1.8.1-5 | 1.8.1-5 |
| debian/jq(Debian:14) | = 1.8.0-1 | No fix listed |
| debian/jq(Debian:14) | = 1.8.1-1 | No fix listed |
| debian/jq(Debian:14) | = 1.8.1-2 | No fix listed |
| debian/jq(Debian:14) | = 1.8.1-3 | No fix listed |
| debian/jq(Debian:14) | = 1.8.1-4 | No fix listed |
| redhat/jq-main(Red Hat:hummingbird:1) | < 1.8.1-3.hum1 | 1.8.1-3.hum1 |
| redhat/jq(Red Hat:enterprise_linux:10) | All versions | No fix listed |
| redhat/jq(Red Hat:enterprise_linux:8) | All versions | No fix listed |
| redhat/jq(Red Hat:enterprise_linux:9) | All versions | No fix listed |
| redhat/openshift/ose-rhel-coreos-8(Red Hat:openshift:4) | All versions | No fix listed |
| redhat/openshift/ose-rhel-coreos-9(Red Hat:openshift:4) | All versions | No fix listed |
| ubuntu/jq(Ubuntu:22.04) | < 1.6-2.1ubuntu3.2 | 1.6-2.1ubuntu3.2 |
| ubuntu/jq(Ubuntu:24.04) | < 1.7.1-3ubuntu0.24.04.2 | 1.7.1-3ubuntu0.24.04.2 |
| ubuntu/jq(Ubuntu:26.04) | < 1.8.1-4ubuntu2 | 1.8.1-4ubuntu2 |
| jqlang jq | < 1.8.2 | 1.8.2 |
| alpine/jq(Alpine:v3.21) | < 1.8.2-r0 | 1.8.2-r0 |
Show 3 more
| Product | Affected versions | Fixed in |
|---|---|---|
| alpine/jq(Alpine:v3.22) | < 1.8.2-r0 | 1.8.2-r0 |
| alpine/jq(Alpine:v3.23) | < 1.8.2-r0 | 1.8.2-r0 |
| alpine/jq(Alpine:v3.24) | < 1.8.2-r0 | 1.8.2-r0 |
References
- MSRC Security Update Guide vendor-advisory
- CBL-Mariner Releases vendor-advisory
- https://github.com/jqlang/jq/security/advisories/GHSA-32cx-cvvh-2wj9 exploit vendor-advisory
- https://github.com/jqlang/jq/commit/6374ae0bcdfe33a18eb0ae6db28493b1f34a0a5b patch
- Debian Security Tracker CVE-2026-33948 vendor-advisory
- Red Hat CVE page mitigation vendor-advisory
- RHSA-2026:8579 patch vendor-advisory
- Red Hat Bugzilla 2458085 issue-tracking
- www.cve.org
- nvd.nist.gov
- Ubuntu CVE tracker vendor-advisory
- USN-8202-1 vendor-advisory
- USN-8202-2 vendor-advisory
- security.alpinelinux.org vendor-advisory
- bugs.debian.org issue-tracking