CVE-2026-33948 jq: Embedded-NUL Truncation in CLI JSON Input Path Causes Prefix-Only Validation of Malformed Input

Low 2.9 Published Updated

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.

Weakness: CWE-20, CWE-170

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.

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.

Is CVE-2026-33948 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free