CVE-2026-41256: jq: Embedded NUL truncates top-level jq programs loaded with -f
jq is a command-line JSON processor. In 1.8.1 and earlier, Top-level jq programs loaded from a file with -f are truncated at the first embedded NUL byte on current upstream HEAD. A crafted filter file such as . followed by \x00 and arbitrary suffix compiles and executes as only the prefix before the NUL. This leaves jq with a post-CVE-2026-33948 prefix/full-buffer mismatch on the compilation path even though the JSON parser path has already been fixed.
Other sources
jq: Embedded NUL truncates top-level jq programs loaded with -f
— Microsoft
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Restrict use of jq -f to trusted filter files only. Block or deny loading filter files from untrusted sources (e.g., disallow user-supplied filter files, restrict directories from which -f may load files, and limit access to those directories to trusted administrators).
- Operational
Scan every jq filter file that may be loaded with -f for embedded NUL bytes (0x00). For any file containing NUL bytes, remove or replace the file with a sanitized version (regenerate the filter without embedded NULs) and do not execute such files with jq -f until a fixed jq release is available.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-41256?
CVE-2026-41256 is classified as a 'moderate' severity vulnerability due to its impact on JSON processing when using jq.
How do I fix CVE-2026-41256?
To fix CVE-2026-41256, update jq to version 1.8.2 or later, which addresses the vulnerability.
What are the possible impacts of CVE-2026-41256?
The impacts of CVE-2026-41256 include truncation of jq programs which may lead to incomplete or incorrect JSON processing.
Which versions of jq are affected by CVE-2026-41256?
CVE-2026-41256 affects jq version 1.8.1 and all earlier versions.
What is jq and its relation to CVE-2026-41256?
jq is a command-line JSON processor, and CVE-2026-41256 concerns the way it handles files with embedded NUL bytes.