CVE-2026-40612
JSON

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 packageVersionsReported by
jqlang jq<= 1.8.1, up to 1.8.1CVE List, NVD

All scores

GitHub_M5.4medium CVSS:4.0CVSS: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
NVD5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

Classification

CWE-674

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

Sources

SourceRecordLicence
CVE ListCVE-2026-40612 changed 2026-05-11CVE Terms of Use
NVDCVE-2026-40612 changed 2026-10-26Public domain