CVE-2026-33948 jq: Embedded-NUL Truncation in CLI JSON Input Path Causes Prefix-Only Validation of Malformed Input
jq truncates input at NUL bytes, allowing attackers to bypass validation and inject malicious data into downstream systems.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-33948?
CVE-2026-33948 is a low-severity vulnerability in jqlang jq, published on 13 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
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.
Which versions are affected by CVE-2026-33948?
It affects 1 product.
Products include Jqlang Jq.
How do I fix CVE-2026-33948?
Apply the vendor's patch.
Is CVE-2026-33948 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-33948 exists.
Other vulnerabilities in jqlang jq
- CVE-2026-32316 jq: Integer overflow in jvp_string_append() allows Heap-based Buffer Overflow
- CVE-2024-53427 Memory corruption in jq
- CVE-2025-48060 AddressSanitizer: stack-buffer-overflow in jq_fuzz_execute (jv_string_vfmt)
- CVE-2023-49355 Memory corruption in n/a
- CVE-2026-49839 jq --rawfile invalid-state reuse after String too long causes heap-buffer-overflow
Sources
Also known as ALPINE-CVE-2026-33948, AZL-82928, BELL-CVE-2026-33948, DEBIAN-CVE-2026-33948, ECHO-efe2-3845-7825, GHSA-32cx-cvvh-2wj9 and 1 more.