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.

Severity (CVSS 4.0)2.9Low
Exploit odds (30 days)0.3%top 82.7% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Alpine:v3.22jq1.8.2-r0ALPINE-CVE-2026-33948
Alpine:v3.23jq1.8.2-r0ALPINE-CVE-2026-33948
Alpine:v3.24jq1.8.2-r0ALPINE-CVE-2026-33948
Debian:12jq1.6-2.1+deb12u2DEBIAN-CVE-2026-33948
Debian:13jq1.7.1-6+deb13u2DEBIAN-CVE-2026-33948
Debian:14jq1.8.1-5DEBIAN-CVE-2026-33948
Ubuntu:22.04:LTSjq1.6-2.1ubuntu3.2USN-8202-1
Ubuntu:22.04:LTSjq1.6-2.1ubuntu3.2UBUNTU-CVE-2026-33948
Ubuntu:24.04:LTSjq1.7.1-3ubuntu0.24.04.2USN-8202-1
Ubuntu:24.04:LTSjq1.7.1-3ubuntu0.24.04.2UBUNTU-CVE-2026-33948
Ubuntu:25.10jq1.8.1-3ubuntu1.1UBUNTU-CVE-2026-33948
Ubuntu:25.10jq1.8.1-3ubuntu1.1USN-8202-1
Ubuntu:26.04:LTSjq1.8.1-4ubuntu2UBUNTU-CVE-2026-33948

Affected products (as reported)

VendorProductVersions
jqlang jq < 6374ae0bcdfe33a18eb0ae6db28493b1f34a0a5b

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