Skip to content

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 demonstrat...

HighCVSS 8.1 EPSS 0.39%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
Proof of concept public · automatable: no · technical impact: total
Technology
UbuntuDebian

Description

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).

Upgrade path

9 packages: 9 fixed.

PackageAffectedFixed inStatus
alpine/jq(Alpine v3.21) < 1.8.2-r0 1.8.2-r0 Fixed
alpine/jq(Alpine v3.22) < 1.8.0-r0 1.8.0-r0 Fixed
alpine/jq(Alpine v3.23) < 1.8.0-r0 1.8.0-r0 Fixed
alpine/jq(Alpine v3.24) < 1.8.0-r0 1.8.0-r0 Fixed
azure linux jq(Azure Linux 3.0) < 1.7.1-2 1.7.1-2 Fixed
debian/jq(Debian 13) < 1.7.1-6+deb13u3; = 1.7.1-6+deb13u1; = 1.7.1-6+deb13u2 1.7.1-6+deb13u3 Fixed
debian/jq(Debian 14) < 1.7.1-5 1.7.1-5 Fixed
jqlang jq <= 1.7.1 after 1.7.1 Fixed
ubuntu/jq(Ubuntu 24.04) < 1.7.1-3ubuntu0.24.04.1 1.7.1-3ubuntu0.24.04.1 Fixed

Affected products

ProductAffected versionsFixed in
azure linux jq(Azure Linux:3.0) < 1.7.1-2 1.7.1-2
debian/jq(Debian:13) < 1.7.1-6+deb13u3 1.7.1-6+deb13u3
debian/jq(Debian:13) = 1.7.1-6+deb13u1 No fix listed
debian/jq(Debian:13) = 1.7.1-6+deb13u2 No fix listed
debian/jq(Debian:14) < 1.7.1-5 1.7.1-5
jqlang jq <= 1.7.1 No fix listed
ubuntu/jq(Ubuntu:24.04) < 1.7.1-3ubuntu0.24.04.1 1.7.1-3ubuntu0.24.04.1
alpine/jq(Alpine:v3.21) < 1.8.2-r0 1.8.2-r0
alpine/jq(Alpine:v3.22) < 1.8.0-r0 1.8.0-r0
alpine/jq(Alpine:v3.23) < 1.8.0-r0 1.8.0-r0
alpine/jq(Alpine:v3.24) < 1.8.0-r0 1.8.0-r0

References