Cloudanix VulnDB

CVE-2025-48060

None

CVSS

—

EPSS

0.6%

Published

May 21, 2025

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

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.

Chainable
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

  1. Identify a target process or script that invokes jq on attacker-controlled JSON
  2. Craft a malicious JSON payload containing an oversized or malformed string format specifier
  3. Deliver the payload via file, pipe, or API that reaches the vulnerable jq version
  4. 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