REDHAT-BUG-2493034: Medium severity JQ jq vulnerability

Published Jun 25, 2026
·
Updated

jq is a command-line JSON processor. Prior to 1.8.2, comparing two sufficiently deeply nested arrays with the == operator exhausts the C stack on jq's ordinary command-line surface, resulting in denial of service via stack exhaustion (uncontrolled recursion). The crash occurs in jq's recursive structural comparison code, with the recursion repeating through jvparrayequal() and jvequal() in src/jv.c when comparing deeply nested arrays; a nearby sort comparator path through jvcmp() in src/jvaux.c overflows the stack at a larger nesting depth from the same missing recursion guard. Anyone running jq comparisons on attacker-controlled deeply nested JSON values, or embedding jq in a context where untrusted data can reach the == comparison path, is affected. This vulnerability is fixed in 1.8.2.

Affected Software

1 affected component
JQ jq<1.8.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade jq to a version that resolves this vulnerability.

    Fixed in 1.8.2

Event History

Jun 25, 2026
Data Sourced
via Red Hat·06:02 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

Who is realistically exposed to this issue?

Systems are exposed when jq compares attacker-controlled, deeply nested JSON arrays using the == operator. This also applies to applications embedding jq if untrusted data can reach that comparison path.

2

What does an attacker need to trigger the denial of service?

The attacker needs to supply two sufficiently deeply nested JSON arrays that are compared with ==. Triggering the issue exhausts the C stack and crashes jq.

3

Are versions before the fixed release affected?

The issue affects jq versions prior to 1.8.2. Version 1.8.2 contains the fix.

4

What related operations should be considered during triage?

A nearby sort comparator path using jv_cmp() can also overflow the stack at a larger nesting depth because it lacks the same recursion guard. Review workflows that sort attacker-controlled deeply nested JSON as well as those using == comparisons.

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