# CVE-2026-41257: jq: Signed-int overflow in `stack_reallocate` (jq VM stack)

- Severity: Medium 6.4 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:L/AC:H/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.14%, higher than 3% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-05-11T17:14:32.579Z
- Modified: 2026-10-26T18:10:00.173Z
- Weaknesses: CWE-190, CWE-787
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

jq is a command-line JSON processor. In 1.8.1 and earlier, the jq bytecode VM's data stack tracks its allocation size in a signed int. When the stack grows beyond ≈1 GiB (via deeply nested generator forks), the doubling arithmetic overflows. The wrapped value is passed to realloc and then used for a memmove with attacker-influenced offsets.

(As written by CVE List.)

## Affected

- jqlang jq: <= 1.8.1; up to 1.8.1

## Every score

- GitHub_M: CVSS:4.0 6.4 Medium `CVSS:4.0/AV:L/AC:H/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`

## References

- <https://github.com/jqlang/jq/security/advisories/GHSA-4jm8-m363-4539> (exploit, mitigation, vendor-advisory)

## Sources

- CVE List: [CVE-2026-41257](https://www.cve.org/CVERecord?id=CVE-2026-41257), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2026-41257](https://nvd.nist.gov/vuln/detail/CVE-2026-41257), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-41257 · Whole record: https://cve.day/CVE-2026-41257.json · Rebuilt by cve.day 2026-11-25T22:59:21.224Z
