CVE-2025-48060
NoneCVSS
—
EPSS
0.6%
Published
May 21, 2025
CISA due date
—
Cloudanix analysis
A bug in a popular command-line tool that handles JSON data can let attackers crash programs or run their own code by feeding it specially crafted input.
- Exploitation
- Other
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Memory Corruption
- Remediation
- No Fix Yet
- Effort
- Other
- Patch risk
- Other
What it actually does
Heap buffer overflow in jv_string_vfmt caused by allocating a buffer via malloc without sufficient size validation, allowing out-of-bounds writes during JSON string formatting.
Why it matters to the business
Processing untrusted JSON inputs with affected jq versions can crash command-line tools or applications, disrupting data pipelines and potentially enabling arbitrary code execution in environments that embed jq.
How an attack unfolds
An attacker supplies a specially crafted JSON document that reaches jv_string_vfmt with an oversized format string, triggering the undersized malloc allocation and subsequent overflow to corrupt heap memory.
How to fix it
Upgrade to the first patched release of jq once available; in the interim, replace jq usage with alternative JSON processors or sanitize inputs before processing.
How to confirm the fix worked
Run jq --version to confirm the installed release exceeds 1.7.1; re-execute the oss-fuzz harness or equivalent fuzzing suite against the updated binary to verify absence of the crash.
Typical attack path
- Identify a target process or script that invokes jq on attacker-controlled JSON
- Craft a malicious JSON payload containing an oversized or malformed string format specifier
- Deliver the payload via file, pipe, or API that reaches the vulnerable jq version
- Trigger jv_string_vfmt execution to induce heap corruption and potential control-flow hijacking
How to detect it
Search process execution logs and command histories for jq invocations on external or untrusted JSON sources; inspect core dumps or sanitizer reports for heap-buffer-overflow signatures originating from jv.c.
What your security team should do
- Inventory all systems and containers using jq <= 1.7.1 and prioritize replacement
- Block untrusted JSON from reaching jq until a fixed version is deployed
- Monitor upstream jq releases for the security patch and apply immediately upon availability
The record
jq is a command-line JSON processor. In versions up to and including 1.7.1, a heap-buffer-overflow is present in function `jv_string_vfmt` in the jq_fuzz_execute harness from oss-fuzz. This crash happens on file jv.c, line 1456 `void* p = malloc(sz);`. As of time of publication, no patched versions are available.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| AlmaLinux:8 | jq | 0 | 1.6-11.el8_10 |
| AlmaLinux:8 | jq-devel | 0 | 1.6-11.el8_10 |
| AlmaLinux:9 | jq | 0 | 1.6-17.el9_6.2 |
| AlmaLinux:9 | jq-devel | 0 | 1.6-17.el9_6.2 |
| Alpine:v3.22 | jq | 0 | 1.8.0-r0 |
| Debian:11 | jq | 0 | No fix |
| Debian:12 | jq | 0 | No fix |
| Debian:13 | jq | 0 | No fix |
| Debian:14 | jq | 0 | 1.8.0-1 |
| SUSE:Linux Enterprise Micro 5.1 | jq | 0 | 1.6-150000.3.9.1 |
| SUSE:Linux Enterprise Micro 5.2 | jq | 0 | 1.6-150000.3.9.1 |
| SUSE:Linux Enterprise Micro 5.3 | jq | 0 | 1.6-150000.3.9.1 |
| SUSE:Linux Enterprise Micro 5.4 | jq | 0 | 1.6-150000.3.9.1 |
| SUSE:Linux Enterprise Micro 5.5 | jq | 0 | 1.6-150000.3.9.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | jq | 0 | 1.6-150000.3.9.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP7 | jq | 0 | 1.6-150000.3.9.1 |
| openSUSE:Leap 15.6 | jq | 0 | 1.6-150000.3.9.1 |
| openSUSE:Tumbleweed | jq | 0 | 1.8.1-1.1 |
Related vulnerabilities
- CVE-2024-23337 jq is a command-line JSON processor. Also affects jq
- CVE-2016-4074 The jv_dump_term function in jq 1.5 allows remote attackers to cause a denial of service… Also affects jq
- CVE-2025-9403 A vulnerability was determined in jqlang jq up to 1.6. Also affects jq
- CVE-2023-49355 decToString in decNumber/decNumber.c in jq 88f01a7 has a one-byte out-of-bounds write via… Also affects jq
- CVE-2026-54679 jq is a command-line JSON processor. Also affects jq
- CVE-2026-47770 jq is a command-line JSON processor. Also affects jq
- CVE-2026-49839 jq is a command-line JSON processor. Also affects jq
- CVE-2026-44777 jq is a command-line JSON processor. Also affects jq