CVE-2023-49355
High · 7.5CVSS
7.5
EPSS
1.2%
Published
Dec 11, 2023
CISA due date
—
Cloudanix analysis
A bug in the popular jq data-processing tool can make it crash when it receives certain unusual numbers, which may interrupt automated scripts and data handling tasks.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
One-byte out-of-bounds write in decToString within the decNumber library triggered by a crafted decimal value in non-normalized scientific notation.
Why it matters to the business
Processing untrusted data with jq can cause the tool or dependent applications to crash, interrupting data transformation pipelines and scripts.
How an attack unfolds
An attacker supplies input containing the specially crafted decimal string to jq running on the command line or invoked as a library; the decToString function performs the out-of-bounds write during number formatting.
How to fix it
Upgrade jq to a version containing a fix for the decNumber out-of-bounds write; if no patched release is available, validate and restrict input formats before passing data to jq.
How to confirm the fix worked
Replay the triggering input []-1.2e-1111111111 against the updated binary under AddressSanitizer or equivalent memory checker and confirm absence of the out-of-bounds write and crash.
Typical attack path
- Identify jq usage that accepts external or untrusted input
- Craft a decimal literal such as []-1.2e-1111111111
- Feed the input to jq via command-line arguments, stdin, or API
- Trigger decToString during number conversion
- Induce memory corruption leading to crash or instability
How to detect it
Search process logs and crash reports for jq invocations that terminate abnormally when the malformed decimal string appears in command arguments or stdin; inspect SIEM entries containing jq execution with numeric literals matching the pattern.
- []-1.2e-1111111111
- decToString
- decNumber.c
What your security team should do
- Inventory all uses of jq that process external data
- Apply the latest available jq release as soon as it is published
- Wrap jq invocations with input validation or sanitization until patched
- Monitor upstream jq repository for the corrective commit
The record
decToString in decNumber/decNumber.c in jq 88f01a7 has a one-byte out-of-bounds write via the " []-1.2e-1111111111" input. NOTE: this is not the same as CVE-2023-50246. The CVE-2023-50246 71c2ab5 reference mentions -10E-1000010001, which is not in normalized scientific notation.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:13 | jq | 0 | 1.7.1-1 |
| Ubuntu:24.04:LTS | jq | 0 | 1.7.1-2 |
Related vulnerabilities
- 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-2026-111497 A buffer overflow vulnerability in the Brotli decoder (c/dec/decode.c) in Google Brotli… CWE-787
- CVE-2026-112397 Pillow is a Python imaging library. CWE-787
- CVE-2026-112059 libLAS through 1.8.1 contains a heap out-of-bounds write vulnerability in the point… CWE-787
- CVE-2026-89088 A flaw was found in parted. CWE-787
- CVE-2026-89085 A flaw was found in parted. CWE-787
- CVE-2026-85746 MariaDB server is a community developed fork of MySQL server. CWE-787
- CVE-2026-107815 MariaDB server is a community developed fork of MySQL server. CWE-787