CVE-2026-40612 PUBLISHED

jq: Stack overflow via unbounded recursion in jv_contains

Assigner: GitHub_M
Reserved: 14.04.2026 Published: 11.05.2026 Updated: 11.05.2026

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.

Metrics

CVSS 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
CVSS Score: 5.4

Product Status

Vendor jqlang
Product jq
Versions
  • Version <= 1.8.1 is affected

References

Problem Types

  • CWE-674: Uncontrolled Recursion CWE