5.4medium
jq: Stack overflow via unbounded recursion in jv_contains
- Severity
- 5.4medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.16% (higher than 5% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- 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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| jqlang jq | <= 1.8.1, up to 1.8.1 | CVE List, NVD |
All scores
| GitHub_M | 5.4medium CVSS:4.0 | 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 | 5.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
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.
NVD (es)
jq es un procesador de JSON de línea de comandos. En 1.8.1 y versiones anteriores, jv_contains recurre en arrays/objetos anidados sin límite de profundidad. Con una estructura de entrada suficientemente anidada (construida programáticamente con reduce, ya que el analizador JSON tiene un límite de profundidad de 10000), la pila de C se agota.
References
| https://github.com/jqlang/jq/security/advisories/GHSA-r7m6-x9c7-h69j | exploit, mitigation, vendor-advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-40612 changed 2026-05-11 | CVE Terms of Use |
| NVD | CVE-2026-40612 changed 2026-10-26 | Public domain |