# CVE-2026-40612: jq: Stack overflow via unbounded recursion in jv_contains

- Severity: Medium 5.4 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/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.16%, higher than 5% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-05-11T17:16:25.453Z
- Modified: 2026-10-26T18:10:00.173Z
- Weaknesses: CWE-674
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

jq is a command-line JSON processor. In 1.8.1 and earlier, jv_contains recurses into nested arrays/objects with no depth limit. With a sufficiently nested input structure (built programmatically with reduce, since the JSON parser caps at depth 10000), the C stack is exhausted.

(As written by CVE List.)

## Affected

- jqlang jq: <= 1.8.1; up to 1.8.1

## Every score

- GitHub_M: CVSS:4.0 5.4 Medium `CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/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-r7m6-x9c7-h69j> (exploit, mitigation, vendor-advisory)

## Sources

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

---

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