Stack-based Buffer Overflow Affecting jq package, versions <0:1.7.1-49.amzn2023.0.2


Severity

Recommended
high

Based on Amazon Linux security rating.

Threat Intelligence

EPSS
0.05% (19th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-AMZN2023-JQ-9598579
  • published2 Apr 2025
  • disclosed26 Feb 2025

Introduced: 26 Feb 2025

CVE-2024-53427  (opens in a new tab)
CWE-121  (opens in a new tab)

How to fix?

Upgrade Amazon-Linux:2023 jq to version 0:1.7.1-49.amzn2023.0.2 or higher.
This issue was patched in ALAS2023-2025-919.

NVD Description

Note: Versions mentioned in the description apply only to the upstream jq package and not the jq package as distributed by Amazon-Linux. See How to fix? for Amazon-Linux:2023 relevant fixed versions and status.

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 with subtraction, such as a filter of .-. when the input has a certain form of digit string with NaN (e.g., "1 NaN123" immediately followed by many more digits).

CVSS Base Scores

version 3.1