Soup Sieve – TL;DR
Soup Sieve, the CSS selector library many Python teams use with Beautiful Soup, has a high-severity denial-of-service flaw tracked as CVE-2026-126191. Versions through 2.10 can hang while compiling certain CSS selectors. You only need to rush if something in your stack compiles selectors that users or tenants supply. Upgrade soupsieve to 3.0.2 or newer; do not stop at 3.0.0, which was yanked from PyPI.
- Find every environment that imports soupsieve or Beautiful Soup’s
.select()helpers, including apps, workers, and notebooks. - Check whether any path compiles a selector from user input (scraping-as-a-service, no-code query builders, custom extraction rules).
- Upgrade to soupsieve 3.0.2 or later and redeploy so every process loads the fixed package.
- If you cannot upgrade yet and selectors are user-supplied, block or tightly validate that input until you can.
- If selectors are only written by your developers, still patch on the next dependency pass; the risk is lower but the fix is small.
This guide covers what CVE-2026-126191 is, who is exposed, how to check in about 15 minutes, how to fix or reduce risk, and what to watch for afterward.
In this guide
- What is it
- Why it matters
- Timeline
- Are you affected?
- How to check
- How to fix or reduce risk
- Were you already hit?
- Lessons for small teams
- FAQ
- Updates
- Sources
What is it
Soup Sieve is a CSS selector library designed to be used with Beautiful Soup 4. GitHub’s advisory GHSA-6655-6qjp-jx7x and CVE-2026-126191 describe inefficient regular expression complexity (CWE-1333) in the CSS_ESCAPES and IDENTIFIER patterns. When those patterns compile a selector with a run of ambiguous digit escapes, matching can backtrack exponentially. The hang happens during selector compilation through soupsieve.compile() or Beautiful Soup .select(), before SELECTOR_LIMIT can help.
GitHub rates it high at CVSS 7.5 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H). Impact is availability: a short malicious selector can stall a worker. Confidentiality and integrity are not affected.
Why it matters
Most teams pass hard-coded selectors written by developers. Those apps are not the urgent case. The urgent case is any product that lets customers, tenants, or uploaded configs supply CSS selectors and then compiles them on a shared worker. The advisory calls out web-scraping-as-a-service, no-code query builders, and user-defined extraction rules.
Soup Sieve sits under Beautiful Soup, so it shows up in many Python scraping and HTML-cleaning stacks even when nobody imports soupsieve by name. A dependency bump that looks routine can still leave an old 2.x wheel in a lockfile or container image.
Timeline
- November 10, 2026: CVE-2026-126191 reserved.
- November 12, 2026: CVE record published; NVD also lists publication around November 12, 2026.
- November 13, 2026: GitHub reviewed advisory GHSA-6655-6qjp-jx7x. CISA’s enrichment notes a proof-of-concept exists.
- Fix line: The CVE text says the issue is fixed in version 3.0. The GitHub advisory says 3.0.0 was yanked from PyPI and tells you to use 3.0.2 and above. Earlier, unrelated regex advisories were fixed in 2.9.2; this vector is different and still present through 2.10.
Are you affected?
You are in the vulnerable package range if installed soupsieve is <= 2.10 (GitHub) or otherwise prior to 3.0 (CVE wording). You are in the high-risk exposure group only if untrusted selector strings reach soupsieve.compile() or Beautiful Soup .select().
- Likely affected: multi-tenant scrapers, internal tools that let analysts paste selectors, automation that reads selectors from tickets or uploads.
- Lower urgency: apps that only use fixed selectors in code or tests, with no user-controlled selector path.
- Not enough by itself: merely depending on Beautiful Soup. Confirm both the soupsieve version and the selector trust boundary.
How to check
Budget about 15 minutes per app environment (dev, staging, production images).
- Inventory the package. In each lockfile, image, or virtualenv, find the installed soupsieve version. Anything <= 2.10 needs a plan to move to 3.0.2 or newer.
- Search the codebase for selector compilation. Look for Beautiful Soup
.select(,.select_one(, andsoupsieve.compile. Note whether the selector argument is a constant or comes from a request, database field, or uploaded file. - Map trust boundaries. For every non-constant selector, write down who can set it and which worker process compiles it.
- Record the result. Version, environments, and whether untrusted selectors exist. That list is what you patch and what you monitor.
How to fix or reduce risk
- Upgrade: move soupsieve to 3.0.2 or later everywhere the old wheel ran. Prefer a lockfile bump and a full image rebuild over patching a live site directory by hand.
- Skip yanked 3.0.0: the advisory warns that 3.0.0 was yanked from PyPI. Target 3.0.2 and above.
- Until you can upgrade: if selectors are user-supplied, stop accepting new selector strings on the vulnerable workers, or restrict them to an allowlist of patterns your team maintains.
- After upgrade: restart or redeploy so long-lived workers are not still importing 2.10 from memory or an old layer.
Were you already hit?
This flaw is a denial of service at compile time, not a remote code execution. Signs look like stuck workers, rising latency, or timeouts when a request path compiles a selector. Review logs around any feature that accepts selector text. CISA’s enrichment marks exploitation as poc, so treat public proof-of-concept material as real enough to prioritize patching, not as proof you were targeted.
Lessons for small teams
- Dependency name ≠ exposure. Beautiful Soup users inherit Soup Sieve; put soupsieve on the bill of materials you actually review.
- Trust the selector source. A parser API that takes a string is safe with constants and dangerous with tenant input—document which you have.
- Yanked fixes happen. Pinning “latest 3.0” is not enough if 3.0.0 was yanked; require 3.0.2+ in the lockfile and in CI.
- ReDoS is a worker problem. Timeouts and concurrency limits help, but upgrading the regex is the real fix.
FAQ
Does Beautiful Soup without an explicit soupsieve pin still matter? Yes. Soup Sieve is the usual CSS selector backend; check the resolved version in the environment that runs production.
Is 2.9.2 enough because earlier advisories were fixed there? No. The GitHub advisory says those earlier issues are fixed in 2.9.2, and this is a different regex and vector still present through 2.10.
Do we need to rotate secrets after patching? Not for this CVE’s described impact. Focus on availability, upgrade verification, and whether untrusted selectors remain reachable.
Updates
- November 13, 2026: GitHub published GHSA-6655-6qjp-jx7x for CVE-2026-126191. Fixed line is soupsieve 3.0.2 and above; 3.0.0 was yanked from PyPI.
- November 17, 2026: Published. No change to the fixed versions or the guidance above. We will add a dated line here if the advisory or patched releases change.

