Vulnerability · Published Apr 13, 2026 · Assigned by GitHub_M
CVE-2026-33948jq: Embedded-NUL Truncation in CLI JSON Input Path Causes Prefix-Only Validation of Malformed Input
Low 2.9
In plain English
A low-severity improper input validation in jq from jqlang. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 17% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.22 | jq | 1.8.2-r0 | ALPINE-CVE-2026-33948 |
| Alpine:v3.23 | jq | 1.8.2-r0 | ALPINE-CVE-2026-33948 |
| Alpine:v3.24 | jq | 1.8.2-r0 | ALPINE-CVE-2026-33948 |
| Debian:12 | jq | 1.6-2.1+deb12u2 | DEBIAN-CVE-2026-33948 |
| Debian:13 | jq | 1.7.1-6+deb13u2 | DEBIAN-CVE-2026-33948 |
| Debian:14 | jq | 1.8.1-5 | DEBIAN-CVE-2026-33948 |
| Ubuntu:22.04:LTS | jq | 1.6-2.1ubuntu3.2 | USN-8202-1 |
| Ubuntu:22.04:LTS | jq | 1.6-2.1ubuntu3.2 | UBUNTU-CVE-2026-33948 |
| Ubuntu:24.04:LTS | jq | 1.7.1-3ubuntu0.24.04.2 | USN-8202-1 |
| Ubuntu:24.04:LTS | jq | 1.7.1-3ubuntu0.24.04.2 | UBUNTU-CVE-2026-33948 |
| Ubuntu:25.10 | jq | 1.8.1-3ubuntu1.1 | UBUNTU-CVE-2026-33948 |
| Ubuntu:25.10 | jq | 1.8.1-3ubuntu1.1 | USN-8202-1 |
| Ubuntu:26.04:LTS | jq | 1.8.1-4ubuntu2 | UBUNTU-CVE-2026-33948 |
Affected products (as reported)
Weakness: CWE-170, CWE-20 · Vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P
References
- https://github.com/jqlang/jq/security/advisories/GHSA-32cx-cvvh-2wj9 x_refsource_CONFIRM
- https://github.com/jqlang/jq/commit/6374ae0bcdfe33a18eb0ae6db28493b1f34a0a5b x_refsource_MISC