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

- Severity: Low 2.9 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.27%, higher than 20% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-04-13T23:51:04.144Z
- Modified: 2026-10-26T22:10:00.163Z
- Weaknesses: CWE-20, CWE-170
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- jqlang jq: < 6374ae0bcdfe33a18eb0ae6db28493b1f34a0a5b; before 1.8.2

## Every score

- GitHub_M: CVSS:4.0 2.9 Low `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`
- NVD: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`

## References

- <https://github.com/jqlang/jq/security/advisories/GHSA-32cx-cvvh-2wj9> (exploit, vendor-advisory)
- <https://github.com/jqlang/jq/commit/6374ae0bcdfe33a18eb0ae6db28493b1f34a0a5b> (patch)

## Sources

- CVE List: [CVE-2026-33948](https://www.cve.org/CVERecord?id=CVE-2026-33948), CVE Terms of Use, modified 2026-04-14
- NVD: [CVE-2026-33948](https://nvd.nist.gov/vuln/detail/CVE-2026-33948), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-33948 · Whole record: https://cve.day/CVE-2026-33948.json · Rebuilt by cve.day 2026-11-25T22:59:18.659Z
