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 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).
What to do
Fixed builds are available from Alpine, Debian, Ubuntu: see the table below for the fixed version per release.
Red Hat has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | jq | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | jq | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | jq | Fixed | 1.7.1-3ubuntu0.24.04.1 | UBUNTU-CVE-2024-53427 |
| Ubuntu 22.04 | jq | Not affected vulnerable_code_not_present | ||
| Debian 14 | jq | Fixed | 1.7.1-5 | DEBIAN-CVE-2024-53427 |
| Debian 13 | jq | Fixed | 1.7.1-6+deb13u3 | DEBIAN-CVE-2024-53427 |
| Red Hat Enterprise Linux 10 | jq | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | jq-devel | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | jq | Not affected | ||
| Red Hat Enterprise Linux 9 | jq-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | jq | Not affected | ||
| Red Hat Enterprise Linux 8 | jq-devel | Not affected | ||
| Alpine Linux 3.24 | jq | Fixed | 1.8.0-r0 | ALPINE-CVE-2024-53427 |
| Alpine Linux 3.23 | jq | Fixed | 1.8.0-r0 | ALPINE-CVE-2024-53427 |
| Alpine Linux 3.22 | jq | Fixed | 1.8.0-r0 | ALPINE-CVE-2024-53427 |
| Alpine Linux 3.21 | jq | Fixed | 1.8.2-r0 | ALPINE-CVE-2024-53427 |
What the vendor says
As published in the CVE record by mitre, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- jqlang jq: affected: up to 1.7.1
References
- https://github.com/jqlang/jq/issues/3196
- https://gist.github.com/Ekkosun/a83870ce7f3b7813b9b462a395e8ad92
- https://github.com/jqlang/jq/blob/71c2ab509a8628dbbad4bc7b3f98a64aa90d3297/src/decNumber/decNumber.c#L3375
- https://github.com/jqlang/jq/security/advisories/GHSA-x6c3-qv5r-7q22
- https://github.com/jqlang/jq/issues/3296
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.