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

Published May 11, 2026
·
Updated

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 Software

2 affected components
JQ jq<=1.8.1
jqlang jq<=1.8.1

Event History

May 11, 2026
CVE Published
via MITRE·05:16 PM
Data Sourced
via MITRE·05:16 PM
DescriptionWeakness
Data Sourced
via NVD·06:16 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-40612?

CVE-2026-40612 is classified as a high-severity vulnerability due to the potential for stack overflow and denial of service.

2

How do I fix CVE-2026-40612?

To mitigate CVE-2026-40612, upgrade to jq version 1.8.2 or later where the unbounded recursion has been addressed.

3

What causes the vulnerability in CVE-2026-40612?

CVE-2026-40612 is caused by unbounded recursion in the jv_contains function when processing deeply nested JSON structures.

4

Who is affected by CVE-2026-40612?

CVE-2026-40612 affects users of jq versions 1.8.1 and earlier, which may expose them to a stack overflow issue.

5

What is jq in relation to CVE-2026-40612?

jq is a command-line JSON processor that is vulnerable to stack overflow issues in processing deeply nested JSON structures as described in CVE-2026-40612.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203