Skip to main content

CVE-2024-23337: CWE-190: Integer Overflow or Wraparound in jqlang jq

Medium
VulnerabilityCVE-2024-23337cvecve-2024-23337cwe-190
Published: Wed May 21 2025 (05/21/2025, 14:34:51 UTC)
Source: CVE
Vendor/Project: jqlang
Product: jq

Description

jq is a command-line JSON processor. In versions up to and including 1.7.1, an integer overflow arises when assigning value using an index of 2147483647, the signed integer limit. This causes a denial of service. Commit de21386681c0df0104a99d9d09db23a9b2a78b1e contains a patch for the issue.

AI-Powered Analysis

AILast updated: 07/07/2025, 14:55:45 UTC

Technical Analysis

CVE-2024-23337 is a medium-severity vulnerability affecting jq, a widely used command-line JSON processor, in versions up to and including 1.7.1. The vulnerability arises from an integer overflow or wraparound condition (CWE-190) triggered when jq processes an assignment using an index value of 2147483647, which is the maximum value for a signed 32-bit integer. This overflow can cause jq to behave unexpectedly, resulting in a denial of service (DoS) condition. Specifically, the integer overflow can lead to memory corruption or application crashes when jq attempts to handle such large index values during JSON processing. The vulnerability does not impact confidentiality or integrity but affects availability by causing jq to terminate or hang. Exploitation requires no privileges (no authentication) but does require user interaction in the form of supplying crafted JSON input to jq. The vulnerability has a CVSS v3.1 base score of 4.3, reflecting its medium severity. A patch addressing this issue was committed in the referenced commit de21386681c0df0104a99d9d09db23a9b2a78b1e, which corrects the integer handling logic to prevent overflow. There are no known exploits in the wild at this time.

Potential Impact

For European organizations, the impact of this vulnerability primarily concerns availability disruptions in environments where jq is used for automated JSON processing, such as data pipelines, configuration management, or log processing. Organizations relying on jq in critical infrastructure, DevOps workflows, or security monitoring tools could experience service interruptions if an attacker or malformed data triggers the overflow. Although the vulnerability does not allow data leakage or unauthorized code execution, denial of service in automated systems can cause operational delays, loss of productivity, and potential cascading failures in dependent systems. Given jq's popularity in open-source tooling and scripting, organizations with extensive automation or integration of JSON processing are at higher risk. The lack of known exploits reduces immediate threat but does not eliminate risk, especially if attackers develop proof-of-concept exploits targeting this flaw.

Mitigation Recommendations

European organizations should immediately audit their environments to identify jq versions in use, especially those at or below 1.7.1. Upgrading jq to the latest patched version that includes the fix from commit de21386681c0df0104a99d9d09db23a9b2a78b1e is the most effective mitigation. Where upgrading is not immediately feasible, organizations should implement input validation and sanitization to prevent processing JSON data containing extremely large index values (≥ 2147483647). Additionally, running jq processes with least privilege and within isolated environments or containers can limit the impact of potential crashes. Monitoring jq logs and system stability can help detect attempts to exploit this vulnerability. Incorporating jq usage into security scanning and configuration management tools will ensure timely detection of vulnerable versions. Finally, educating developers and DevOps teams about this vulnerability will reduce the risk of inadvertent exposure.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2024-01-15T15:19:19.443Z
Cisa Enriched
false
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682de8d1c4522896dcc0041f

Added to database: 5/21/2025, 2:53:05 PM

Last enriched: 7/7/2025, 2:55:45 PM

Last updated: 8/17/2025, 1:22:34 PM

Views: 22

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats