# CVE-2026-41256: jqlang jq NUL byte truncation in program compilation

Source: https://junglewise.ai/threats/cve-2026-41256-jqlang-jq-nul-byte-truncation-in-program-compilation  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-11. Updated: 2026-05-11  
License: CC BY 4.0 with a link back

CVE-2026-41256 · Severity: medium · CVSS 5.5 · Published 2026-05-11

jq is a widely used command-line tool for processing and transforming JSON data. A vulnerability exists where jq fails to process the entirety of a script file if it contains a hidden 'null' character, causing it to silently ignore any code following that character. This could allow an attacker to bypass security reviews or automated scanners by hiding malicious or unexpected logic in a file that appears benign to other tools.

Technologies: [Jqlang Jq](https://junglewise.ai/threats/technologies/jq). Vendors: [Jqlang](https://junglewise.ai/threats/vendors/jqlang).

## Quick answers

**Is CVE-2026-41256 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-41256 being exploited in the wild.

**How severe is CVE-2026-41256?** Medium severity, with a CVSS score of 5.5, published 11 May 2026.

**Which products and versions are affected?** Jqlang Jq Up to and including 1.8.1.

**Is there a fix for CVE-2026-41256?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-41256 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-41256?** Check whether you run Jqlang Jq at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A vulnerability in the top-level program compilation path of jq (specifically when using the -f flag) causes the compiler to truncate the input file at the first embedded NUL (\x00) byte. This occurs because the program data is passed to functions using C-string semantics (strlen) rather than length-aware buffers. An attacker can craft a filter file where a valid prefix is followed by a NUL byte and an arbitrary (even syntactically invalid) suffix; jq will compile and execute only the prefix. This creates a discrepancy between what security tools (like signers or scanners) see in the full file and what jq actually executes. The issue affects versions up to 1.8.1 and current upstream HEAD.

## Affected products

- jqlang jq Up to and including 1.8.1

## Timeline

- 2026-04-24: advisory: GitHub Security Advisory published by maintainers
- 2026-05-11: disclosed: CVE-2026-41256 published to NVD

## References

- [https://github.com/jqlang/jq/security/advisories/GHSA-vf2h-chrj-q3fg](https://github.com/jqlang/jq/security/advisories/GHSA-vf2h-chrj-q3fg)

## Related threats

- [jqlang jq integer overflow in jvp_string_append on 32-bit systems](https://junglewise.ai/threats/cve-2026-54679-jqlang-jq-integer-overflow-in-jvp-string-append-on-32-bit-systems)
- [jqlang jq heap out-of-bounds write in --rawfile processing](https://junglewise.ai/threats/cve-2026-49839-jqlang-jq-heap-out-of-bounds-write-in-rawfile-processing)
- [jqlang jq Denial of Service via Stack Exhaustion in Structural Comparison](https://junglewise.ai/threats/cve-2026-47770-jqlang-jq-denial-of-service-via-stack-exhaustion-in-structural)
- [jqlang jq uncontrolled recursion in module loader](https://junglewise.ai/threats/cve-2026-44777-jqlang-jq-uncontrolled-recursion-in-module-loader)
- [jqlang jq stack overflow in jv_object_merge_recursive](https://junglewise.ai/threats/cve-2026-43896-jqlang-jq-stack-overflow-in-jv-object-merge-recursive)
