# CVE-2026-43895: jqlang jq path resolution mismatch via embedded NUL bytes in linker

Source: https://junglewise.ai/threats/cve-2026-43895-jqlang-jq-path-resolution-mismatch-via-embedded-nul-bytes-in  
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-43895 · Severity: medium · CVSS 4.4 · Published 2026-05-11

jq is a popular command-line tool used for processing and transforming JSON data. A vulnerability in how it handles file imports allows an attacker to bypass security policies that restrict which files jq is allowed to access. In practice, this could allow sensitive data (like API keys or internal notes) to be accidentally included in public reports or software releases because the tool loaded a private configuration file instead of the intended public one.

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

## Quick answers

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

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

**Which products and versions are affected?** Jqlang Jq <= 1.8.1.

**Is there a fix for CVE-2026-43895?** 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-43895 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-43895?** 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 semantic mismatch exists between jq's length-aware strings and the underlying C string operations used in src/linker.c. While the jq language level accepts strings with embedded NUL bytes (\u0000), the linker converts these to NUL-terminated C strings during module and data-file lookup. Functions such as validate_relpath(), find_lib(), and jv_load_file() truncate the path at the first NUL byte. This allows an attacker to craft an import string that passes prefix/suffix validation logic in a wrapper script (e.g., requiring a '_public' suffix) while jq actually resolves and opens a different file on disk. This is primarily a risk in CI/CD pipelines or automated sanitization workflows where jq filters are provided by less-trusted sources.

## Affected products

- jqlang jq <= 1.8.1

## Timeline

- 2026-05-09: advisory: GitHub Security Advisory published
- 2026-05-11: disclosed: CVE-2026-43895 published to NVD

## References

- [https://github.com/jqlang/jq/security/advisories/GHSA-7q7g-mrq3-phxr](https://github.com/jqlang/jq/security/advisories/GHSA-7q7g-mrq3-phxr)

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