Critical Stack Buffer Overflow in jq Package - CVE-2024-53427

jq Updated 02 Oct 2025

Summary

26/02/2025
N/A
Yes i
Unrated
Not published

CVE-2024-53427: decNumberCopy in decNumber.c in jq through 1.7.1 does not properly consider that NaN is interpreted as numeric, which has a resultant stack-based buffer overflow and out-of-bounds write, as demonstrated by use of --slurp... Affects jq across 2 version ranges.

< 1.8.0-r0 < 71c2ab509a8628dbbad4bc7b3f98a64aa90d3297

Fixed in 1.8.0-r0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

jq is a lightweight and flexible command-line JSON processor that allows users to slice, filter, map, and transform structured data effortlessly. It is widely used in various applications for handling JSON data due to its powerful querying capabilities. However, the version 1.7.1 of jq has been identified to contain a critical vulnerability that could lead to severe security risks.

Vulnerability Detail

CVE-2024-53427 is a stack-buffer-overflow vulnerability found in the decNumberCopy function within decNumber.c of jq version 1.7.1. This flaw allows attackers to exploit the buffer overflow, potentially leading to arbitrary code execution or crashes. The vulnerability arises from improper handling of memory allocation, which can be triggered by specially crafted inputs, making it a significant threat to systems utilizing this version of jq.

How To Fix

Minimum fixed version

1.8.0-r0

This is the first release that contains the fix.

sudo apk add --upgrade jq

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can avoid using jq version 1.7.1 until they can upgrade to a secure version. Additionally, validating and sanitizing input data before processing it with jq may help mitigate the risk of exploitation.

Conclusion

The vulnerability CVE-2024-53427 in jq version 1.7.1 poses a significant security risk due to a stack-buffer-overflow issue. Users are strongly advised to update to a patched version to protect their systems. Temporary workarounds can help mitigate risks until an update can be applied.

See every vulnerability recorded for jq →

Share this vulnerability

FAQ

CVE-2024-53427 is a vulnerability in jq version 1.7.1 that allows for a stack-buffer-overflow, potentially leading to arbitrary code execution.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.

Exploitation of this vulnerability can lead to arbitrary code execution, crashes, and unauthorized access to sensitive data.

Yes, a patched version of jq is available. Users should update to a version later than 1.7.1 to mitigate the risk.

If immediate updating is not possible, consider validating and sanitizing inputs to reduce the risk of exploitation.

Related vulnerabilities

Recent vulnerabilities recorded for jq.

How To Fix

Minimum fixed version

1.8.0-r0

This is the first release that contains the fix.

sudo apk add --upgrade jq

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback