Medium severity · published Apr 13, 2026
CVE-2026-33948
jq: Embedded-NUL Truncation in CLI JSON Input Path Causes Prefix-Only Validation of Malformed Input
5.3
CVSS
0.3%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
None
Integrity
Low
Availability
None
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.3% · higher than 17% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
JQ
jq · jqlang
< 6374ae0bcdfe33a18eb0ae6db28493b1f34a0a5b · source: vendor, NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-33948
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-33948
Patch
https://github.com/jqlang/jq/commit/6374ae0bcdfe33a18eb0ae6db28493b1f34a0a5b
Exploit
https://github.com/jqlang/jq/security/advisories/GHSA-32cx-cvvh-2wj9
More from jq
8.1
CVE-2024-53427
decNumberCopy in decNumber.c in jq through 1.7.1 does not properly consider that NaN is interpreted as numeric, which has a resultant stack-based buffer overflow and out-of-bounds…
7.5
CVE-2026-40164
jq: Algorithmic complexity DoS via hardcoded MurmurHash3 seed
7.5
CVE-2026-32316
jq: Integer overflow in jvp_string_append() allows Heap-based Buffer Overflow
7.5
CVE-2025-48060
jq is a command-line JSON processor
7.5
CVE-2023-49355
decToString in decNumber/decNumber.c in jq 88f01a7 has a one-byte out-of-bounds write via the " []-1.2e-1111111111" input
