Skip to content
OpenAdvisories

Description

Soup Sieve is a CSS selector library designed to be used with Beautiful Soup 4. Prior to 2.9, the selector parser in src/soupsieve/css_parser.py defines IDENTIFIER with adjacent quantified groups over overlapping character classes, and VALUE embeds IDENTIFIER for attribute selectors. When an attacker-controlled selector contains a long identifier or unquoted attribute-value run followed by input that makes the overall match fail, the regular expression engine explores quadratically many splits between the overlapping groups. User-controlled selectors can reach this path through soupsieve.compile(), soupsieve.select(), or BeautifulSoup.select(), while applications using only hard-coded selectors are unaffected. The resulting CPU consumption can hold the Python GIL, exhaust application workers, and stall a service; successful plain identifier matches are linear, and the issue does not cause memory corruption or code execution. The issue is fixed in version 2.9.

Affected products

VendorProductAffectedFixed
facelessuser soupsieve < 2.9 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 soupsieve 4.1-1 —
Debian 13 soupsieve No fix yet —
Debian 12 soupsieve No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 soupsieve No fix yet —
Ubuntu 26.04 LTS soupsieve No fix yet —
Ubuntu 24.04 LTS soupsieve No fix yet —
Ubuntu 22.04 LTS soupsieve No fix yet —
Ubuntu 20.04 LTS soupsieve No fix yet —
ReleasePackageFixed inAdvisory
SLES 15 SP7 python-soupsieve 1.9.5-150200.3.6.1 SUSE-SU-2026:5164-1
SLES 3 python-soupsieve 2.5-150600.3.6.1 SUSE-SU-2026:4365-1
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 16.0 python-soupsieve 2.6-160000.5.1 SUSE-SU-2026:24267-1
SLES 16.0 python-soupsieve 2.6-160000.5.1 SUSE-SU-2026:24267-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python-soupsieve 2.9.2-1.1 openSUSE-SU-2026:11866-1
openSUSE Leap 16.0 python-soupsieve 2.6-160000.5.1 openSUSE-SU-2026:22149-1

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 python-soupsieve No fix yet —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling datadog-agent-7.77-core-integrations +4 No fix yet —
Wolfi rolling open-webui 0.11.3-r7 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI soupsieve < 2.9.0 2.9.0 GHSA-gjv8-xp57-g29c

Advisories 5

References