CVE-2026-126191: Soup Sieve: Exponential ReDoS in selector compilation via \9-run in CSS_ESCAPES/IDENTIFIER

Published Nov 12, 2026
·
Updated

Soup Sieve is a CSS selector library designed to be used with Beautiful Soup 4. Prior to 3.0, the CSSESCAPES and IDENTIFIER regular-expression subpatterns can backtrack exponentially on runs of ambiguous digit escapes in an attribute-name or tag position of an otherwise valid selector. The failure occurs during selector compilation through soupsieve.compile() or Beautiful Soup select() before SELECTORLIMIT is applied, so an application that accepts untrusted selector strings can have a worker stalled by a short input. This issue is fixed in version 3.0.

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Soup Sieve to a version that resolves this vulnerability.

    Fixed in 3.0

Event History

Nov 12, 2026
CVE Published
via MITRE·04:57 PM
Data Sourced
via MITRE·04:57 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which applications are realistically exposed to this issue?

Applications using Soup Sieve prior to 3.0 are exposed if they accept untrusted CSS selector strings and compile them with soupsieve.compile() or pass them to Beautiful Soup select(). The issue affects selector compilation before SELECTOR_LIMIT is applied.

2

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

An attacker needs to supply an otherwise valid selector containing a run of ambiguous digit escapes in an attribute-name or tag position. No authentication or user interaction is required according to the supplied CVSS vector.

3

Are selector-length limits sufficient mitigation?

No. The exponential backtracking occurs during selector compilation before SELECTOR_LIMIT is applied, and a short malicious selector can stall a worker.

4

What should be done if the application cannot be upgraded immediately?

Do not allow untrusted users to provide arbitrary selector strings to Soup Sieve compilation or Beautiful Soup select(). Restrict selector input to trusted or tightly controlled values until upgrading to version 3.0.

5

How can I determine whether my deployment is affected?

Check whether Soup Sieve is a version prior to 3.0 and whether the application compiles selector strings from untrusted input using soupsieve.compile() or Beautiful Soup select(). Deployments that do not accept untrusted selector strings are not described as exploitable by the provided information.

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