Jq
CVE-2026-33948
LOW
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconCraft JSON with valid prefix and NUL byte
-
DeliverySubmit to jq validator
-
Exploitjq truncates at NUL, validates prefix only
-
InstallAttacker's suffix silently discarded by jq
-
C2Full input forwarded to downstream consumer
-
ExecuteConsumer processes suffix payload
-
ImpactInjection or bypass succeeds
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation, allowlisting
|
| Impact | CVSS 2.9 is exceptionally low, yet the vulnerability has meaningful real-world impact in specific contexts. The CVSS vector shows attack timing complexity (AT:P), indicating attacks require precise timing or interaction setup, which suppresses severity. However, the vulnerability is deliberately craftable: an attacker can reliably construct malicious input with embedded NUL bytes; timing is not random but deterministic. The VI:L (Integrity, Low) rating reflects that only input validation is bypassed, not direct system compromise. EPSS value of P (Proof-of-Concept) signals that public exploit code exists or is feasible. KEV status is not confirmed in the data, but upstream fix is available (commit 6374ae0bcdfe33a18eb0ae6db28493b1f34a0a5b), indicating developer awareness and remediation readiness. Real-world risk is contingent on deployment pattern: if jq is used as a trust boundary (e.g., validating JSON before passing to a web framework, message queue, or script processor), this is a high-priority issue because it breaks that boundary. If jq is merely reformatting user-controlled JSON for display, risk is minimal. The low CVSS should not dismiss this-it reflects attack complexity, not threat model relevance. Organizations relying on jq for security-critical validation must prioritize patching. |
| Exploit ScenarioDerived | An attacker submits JSON input containing a valid JSON object (e.g., {"status":"ok"}) followed by an embedded NUL byte (0x00) and arbitrary trailing bytes. A validation service using jq to check the JSON parses the prefix, reports it as valid, and forwards the complete untouched input (with the suffix intact) to a downstream processor such as a web framework or logging system. If that processor handles NUL bytes differently (e.g., a C-based JSON parser without NUL-aware length validation), the attacker's trailing payload may be processed as additional JSON fields, JavaScript code injection, or command injection depending on the downstream consumer's interpretation. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 14, 2026
Input validation bypass in jq command-line JSON processor allows attackers to craft JSON with embedded NUL bytes that jq incorrectly truncates, validating only a benign prefix while silently discarding malicious trailing data. Versions before commit 6374ae0bcdfe33a18eb0ae6db28493b1f34a0a5b are affected; the vulnerability enables parser differential attacks where jq validates hostile input as safe JSON, but downstream consumers process the complete input including injected payloads. With low CVSS (2.9) and attack timing complexity, exploitation risk remains moderate in scenarios where jq serves as a validation gate for untrusted JSON forwarded to other processors.
RemediationAI
Update jq to a version incorporating commit 6374ae0bcdfe33a18eb0ae6db28493b1f34a0a5b or later. For Linux distributions, use your package manager (apt, yum, brew, etc.) to upgrade to the latest available jq release; most distributions have already patched this in recent versions. For users building from source, clone the jq repository and build from the main branch or any release tagged after the fix commit. Interim mitigation for systems unable to patch immediately: pre-filter untrusted JSON input using a binary-safe parser or octet-stream validator (e.g., a Python script using json.loads with proper byte handling) before passing to jq, thereby avoiding reliance on jq as a sole validation gate. Detailed patching guidance is available at https://github.com/jqlang/jq/security/advisories/GHSA-32cx-cvvh-2wj9.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
jq implements JSON parsing by reading input via fgets() into a buffer, then calculating the string length using strlen(), which terminates at the first NUL byte (0x00 character). This causes a length mismatch: fgets() may fill the buffer with N bytes of actual data, but strlen() reports only the count before the first NUL, artificially truncating the logical input. The root cause is improper input length handling (CWE-20: Improper Input Validation) combined with a classic buffer handling error where length calculation ignores embedded NUL bytes. Attackers exploit this by supplying input structured as valid_json\x00malicious_data-jq parses and validates only the benign prefix, then discards the suffix without error, while a parser that respects the full octet stream (e.g., one reading from a file descriptor or memory without relying on strlen()) will process both parts. This is a parser differential vulnerability stemming from how C's str-based APIs (strlen) conflict with true binary-safe I/O semantics.
Know when Jq gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Primary rating from Vendor (github) · only source for this CVE.
CVSS VectorVendor: github
Lifecycle Timeline
2DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
Affected Products (CPE)CVE.org
Related Vulnerabilities in jq JSON Processor Vulnerabilities
View all 2decNumberCopy in decNumber.c in jq through 1.7.1 does not properly consider that NaN is interpreted as numeric, which ha
Off-by-one error in the tokenadd function in jv_parse.c in jq allows remote attackers to cause a denial of service (cras
jq is a command-line JSON processor. Rated high severity (CVSS 7.7), this vulnerability is remotely exploitable, no auth
The jv_dump_term function in jq 1.5 allows remote attackers to cause a denial of service (stack consumption and applicat
decToString in decNumber/decNumber.c in jq 88f01a7 has a one-byte out-of-bounds write via the " []-1.2e-1111111111" inpu
jq is a command-line JSON processor. Rated medium severity (CVSS 5.5), this vulnerability is low attack complexity. Publ
jq is a command-line JSON processor. Rated medium severity (CVSS 5.5), this vulnerability is low attack complexity. Publ
A heap-based buffer overflow in jqlang/jq through version 1.8.1 allows remote, unauthenticated attackers to crash - and
Out-of-bounds write in the jq command-line JSON processor (CWE-787) lets a crafted JSON input corrupt memory when parsed
jq, the command-line JSON processor, was patched in Alpine Linux with package version 1.8.2-r0. The specific vulnerabili
Out-of-bounds read in libjq's jv_parse_sized() API exposes any embedding application to memory disclosure or process ter
jq on Alpine Linux was patched in package version 1.8.2-r0, addressing an unspecified vulnerability. The nature of the f
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB