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).
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| jqlang | jq | ≤ 1.7.1 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | jq | 1.7.1-5 | — |
| Debian 13 | jq | 1.7.1-6+deb13u3 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 24.04 LTS | jq | 1.7.1-3ubuntu0.24.04.1 | USN-7657-1 |
| Ubuntu 22.04 LTS | jq | 1.6-2.1ubuntu3.1 | USN-7657-1 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP7 | jq | 1.7.1-150000.3.25.1 | SUSE-SU-2026:4275-1 |
| SLES 15 SP6 | jq | 1.7.1-150000.3.25.1 | SUSE-SU-2026:4275-1 |
| SLES 15 SP5 | jq | 1.7.1-150000.3.25.1 | SUSE-SU-2026:4275-1 |
| SLES 15 SP4 | jq | 1.7.1-150000.3.25.1 | SUSE-SU-2026:4275-1 |
Show 10 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 15 SP6 | jq | 1.7.1-150000.3.25.1 | SUSE-SU-2026:4275-1 |
| SLES for SAP 15 SP5 | jq | 1.7.1-150000.3.25.1 | SUSE-SU-2026:4275-1 |
| SLES for SAP 15 SP4 | jq | 1.7.1-150000.3.25.1 | SUSE-SU-2026:4275-1 |
| SLE Micro 6.1 | jq | 1.7.1-slfo.1.1_2.1 | SUSE-SU-2025:20591-1 |
| SLE Micro 6.0 | jq | 1.7.1-1.1 | SUSE-SU-2026:23873-1 |
| SLE Micro 5.5 | jq | 1.7.1-150000.3.25.1 | SUSE-SU-2026:4275-1 |
| SLE Micro 5.4 | jq | 1.7.1-150000.3.25.1 | SUSE-SU-2026:4275-1 |
| SLE Micro 5.3 | jq | 1.7.1-150000.3.25.1 | SUSE-SU-2026:4275-1 |
| SLE HPC 15 SP5 | jq | 1.7.1-150000.3.25.1 | SUSE-SU-2026:4275-1 |
| SLE HPC 15 SP4 | jq | 1.7.1-150000.3.25.1 | SUSE-SU-2026:4275-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | jq | 1.7.1-3.1 | openSUSE-SU-2025:15161-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | jq | 1.8.0-r0 | — |
| Alpine v3.23 | jq | 1.8.0-r0 | — |
| Alpine v3.22 | jq | 1.8.0-r0 | — |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | jq +1 | 1.7.1-49.amzn2023.0.2 | ALAS2023-2025-919 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | jq | 1.7.1-2 | — |
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | jq | 1.7.1-r4 | — |
Advisories 6
- SUSE-SU-2026:23873-1 Security update for jq SUSE / openSUSE Security Updates · Sep 28, 2026
- SUSE-SU-2026:4275-1 Security update for jq SUSE / openSUSE Security Updates · Sep 21, 2026
- USN-7657-1 jq vulnerabilities Ubuntu Security Notices (USN) · Apr 27, 2026
- openSUSE-SU-2025:15161-1 jq-1.7.1-3.1 on GA media SUSE / openSUSE Security Updates · Mar 23, 2026
- SUSE-SU-2025:20591-1 Security update for jq SUSE / openSUSE Security Updates · Mar 23, 2026
- ALAS2023-2025-919 Important: jq security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Apr 1, 2025
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