Tested 14 November 2026 on Python 3.10.22, 3.11.4 and 3.12.16 (official Docker images), soupsieve 2.10 and 4.1, uv 0.13.8 · Updated
soupsieve CVE-2026-126190: why the alert won't close on Python 3.10 or 3.11.0 to 3.11.4
On 13 November GitHub published four advisories for soupsieve, the CSS selector library behind Beautiful Soup's select(). Three of them are still open on soupsieve 2.10, and every release that fixes them needs Python 3.11.5 or newer. On Python 3.10, or 3.11.0 to 3.11.4, 2.10 is the newest soupsieve pip will install. pip install -U soupsieve reports "Requirement already satisfied", and uv lock --upgrade-package soupsieve keeps 2.10 for those Python versions. uv audit and pip-audit keep flagging it, and maintainers have reported since 13 November that their Dependabot alerts stay open.
You have two ways out: raise your Python floor to 3.11.5, or keep it and record the finding. Which one is safe depends on what your code does with selectors and HTML. Four things the advisories don't spell out:
requires-python = ">=3.11"is not enough. uv still locks soupsieve 2.10 for 3.11.0 to 3.11.4. Only>=3.11.5gives a lock without 2.10.- The high-severity CVE-2026-126190 doesn't need a malicious selector. A fixed, ordinary selector such as
section div divis enough if the HTML comes from someone else. On 2.10 it ran past our 15-second limit on 4.4 KB of nested<div>s. On 4.1 it took under 0.01 s. - The other two need a selector string from outside. CVE-2026-126191 and CVE-2026-126193 fire while a selector is compiled. Selectors written in your own code don't trigger them, unless you build them from outside text.
uv audit --ignore-until-fixeddoesn't clear them. A fixed release exists, just not for your Python.--ignoredoes clear them.
Why the upgrade doesn't clear the alert
| Advisory | Severity | Open on 2.10? | First fixed release | That release needs |
|---|---|---|---|---|
| CVE-2026-126190 (GHSA-mmhr-3c5m-f64f) | high | yes | 4.0 | Python 3.11.5 |
| CVE-2026-126191 (GHSA-6655-6qjp-jx7x) | high | yes | 3.0.2 | Python 3.11.5 |
| CVE-2026-126193 (GHSA-7g44-g9rc-x53w) | medium | yes | 3.0.2 | Python 3.11.5 |
| CVE-2026-126192 (GHSA-4j63-6c4x-wfg4) | medium | no | 2.10 | Python 3.10 |
soupsieve 3.0.2 and every later release (3.0.3, 3.0.4, 4.0, 4.0.1, 4.1) declare Requires-Python >=3.11.5. The changelog for 3.0.2 gives the reason: "Python versions less than 3.11.5 have broken possessive quantifiers", which the 3.0 parser relies on. 3.0 and 3.0.1, which allowed any 3.11, were yanked. Beautiful Soup 4.15.0 asks only for soupsieve>=1.6.1, so nothing in your tree can pull a newer soupsieve onto an older Python.
On Python 3.10.22, pip says so directly when you ask for a fixed version:
ERROR: Ignored the following versions that require a different python version: 3.0 Requires-Python >=3.11; 3.0.1 Requires-Python >=3.11; 3.0.2 Requires-Python >=3.11.5; [...] 4.1 Requires-Python >=3.11.5
[...]
ERROR: No matching distribution found for soupsieve>=3.0.2Python 3.11.4 gives the same error, without 3.0 and 3.0.1 in the list. A uv project that supports 3.10 locks both versions, one for each side of 3.11.5. This is from uv.lock with requires-python = ">=3.10", before and after uv lock --upgrade-package soupsieve:
soupsieve==2.10 ; python_full_version < '3.11.5'
soupsieve==4.1 ; python_full_version >= '3.11.5'uv audit reads the whole lock, so it reports soupsieve 2.10 even when you run it on Python 3.12 (--python-version 3.12 gave the same three findings). Adding soupsieve>=4 to your dependencies while keeping 3.10 makes uv lock fail: "soupsieve>=4.0 cannot be used", with a hint to raise requires-python to >=3.11.5.
Which systems land on the old branch: any python:3.10 image; python:3.11.4 and older 3.11 tags; Ubuntu 22.04, whose python3 is 3.10; and Debian 12, whose python3 is 3.11.2. Python 3.10's end-of-life date was 1 October 2026. soupsieve isn't the only package with this wall: Pillow's fixes are only in 13.0.0, which needs Python 3.11. We cover that in stuck on Pillow 12.3.0.
Check your project
Run this from your project's folder, in the environment you deploy. It uses only the standard library; we ran it on Python 3.10 and 3.12. The first line prints your Python and soupsieve versions. The rest scans your .py files for calls to select, select_one and iselect (as methods such as soup.select(...), or after from soupsieve import select) and for any call on sv., soupsieve. or .css.. For each one it takes the selector from the first argument, or from a selector=, select= or pattern= keyword, and says whether it is a fixed string and, if so, whether it has a descendant combinator (a space, tab or line break between two parts, as in section div or li:nth-child(2) a).
python3 -c 'import sys, importlib.metadata as m; print("python", sys.version.split()[0], "soupsieve", m.version("soupsieve"))'
python3 - <<'PY'
import ast, pathlib, re
SKIP = {".venv", "venv", "site-packages", "node_modules", ".tox", ".git"}
NAMES = ("select", "select_one", "iselect")
def descendant(sel):
s = re.sub(r'"[^"]*"|\'[^\']*\'|\[[^\]]*\]', "", sel).strip()
s = re.sub(r"\s*([>+~,])\s*", r"\1", s)
s = re.sub(r"\(\s+", "(", s)
s = re.sub(r"\s+\)", ")", s)
return bool(re.search(r"\s", s))
for p in sorted(pathlib.Path(".").rglob("*.py")):
if SKIP & set(p.parts): continue
try: tree = ast.parse(p.read_bytes())
except (SyntaxError, ValueError): print(f"{p}: could not be parsed by this Python, check it by hand"); continue
for n in ast.walk(tree):
if not isinstance(n, ast.Call): continue
f = n.func
if isinstance(f, ast.Attribute):
owner = getattr(f.value, "attr", getattr(f.value, "id", ""))
if f.attr not in NAMES and owner not in ("css", "sv", "soupsieve"): continue
elif not (isinstance(f, ast.Name) and f.id in NAMES): continue
kw = [k.value for k in n.keywords if k.arg in ("selector", "select", "pattern")]
a = n.args[0] if n.args else (kw[0] if kw else None)
if a is None: continue
if isinstance(a, ast.Constant) and isinstance(a.value, str):
print(f"{p}:{n.lineno}: fixed, {'HAS' if descendant(a.value) else 'no'} descendant combinator: {a.value!r}")
else: print(f"{p}:{n.lineno}: NOT a fixed string, find where it comes from")
PYIf you use uv, grep -A1 '^name = "soupsieve"' uv.lock shows every soupsieve version in your lock. A 2.10 line means the old branch is still there.
The scan lists any method called select, so SQLAlchemy's select() and similar calls show up too; skip the ones that aren't Beautiful Soup. An f-string such as f"div.{cls} p" counts as "not a fixed string": look at what fills it. If scraped or user text fills it, treat it as a selector from outside (see below). A constant from your own code, as in soup., also shows as "not a fixed string": it is fixed, so check the string it holds for a descendant combinator. A file the running Python can't parse (newer syntax, for example) gets a "could not be parsed" line: check it by hand. No other output after the version line means none of those forms appear in your code. Other forms aren't listed: soupsieve imported under another name (import soupsieve as ss), or from soupsieve import compile (or match, filter) followed by a bare call. Search for those by hand. If the first line fails with PackageNotFoundError, soupsieve isn't installed in that environment.
Which advisories reach your code
| Advisory | What has to come from outside | On 2.10 (Python 3.10.22) | On 4.1 (Python 3.12.16) |
|---|---|---|---|
| CVE-2026-126190 | the HTML or XML you run a selector on, if the selector has a descendant combinator | section div div on 4.4 KB of nested <div>: stopped at our 15 s limit. section div div div on 1.1 KB: 7.4 s | under 0.01 s for both |
| CVE-2026-126191 | the selector string | a 53-byte selector took 4.4 s to compile | under 0.01 s |
| CVE-2026-126193 | the selector string | a 1,653-byte selector raised RecursionError | compiled |
One run each on a shared machine, so the times move from run to run; the gap between the versions doesn't. On Python 3.11.4 with 2.10, the two CVE-2026-126190 tests took 9.0 s and 3.8 s, the CVE-2026-126191 selector 6.7 s, and the CVE-2026-126193 selector raised RecursionError. Parsing with lxml instead of html.parser didn't help: lxml kept all 2,000 levels of a 2,000-deep document, and section div div on the 400-deep one again ran past 15 s.
So:
- Fixed selectors, HTML you control (HTML whose nesting no outsider can influence, including through user content you render into it, such as Markdown with nested quotes or lists): none of the three reach you.
- Fixed selectors, HTML from outside (a scraper, a feed reader, a service that processes uploaded or fetched pages): CVE-2026-126190 reaches you if any selector has a descendant combinator. That covers most scrapers.
- Selectors from outside (user-defined extraction rules, a query builder, an API that takes a CSS selector, or a selector your code builds from scraped or user text): CVE-2026-126191 and CVE-2026-126193 reach you, whatever the HTML.
Option 1: raise your floor to Python 3.11.5
If you can, do this. In pyproject.toml:
requires-python = ">=3.11.5"With that line, uv lock gave a lock with only soupsieve 4.1, and uv audit reported no known vulnerabilities. >=3.11 still kept 2.10 (see above). Users still on Python 3.10 will get your previous release, so say so in your changelog.
Read soupsieve's changelog before you ship, because 2.10 to 4.x is not a drop-in upgrade. 3.0 made :has() stricter by default; 4.0 stopped selecting inside <template> contents and treats <iframe> contents as ordinary children. We did not test these changes against real scrapers; your own tests are the check.
Option 2: keep Python 3.10 and record the finding
This is honest only for the uses the finding doesn't reach (see above), or with a workaround in place.
If CVE-2026-126190 reaches you (fixed selectors, outside HTML), soupsieve's advisory lists three workarounds for versions that can't upgrade. We timed the first two on 2.10:
- Use the child combinator where you know the structure, and as few descendant combinators as you can.
section > div > divchecks only the parent. On the same 400-deep document it took 0.02 s, against more than 15 s forsection div div. It matches fewer elements, so check that your results don't change. Even one descendant combinator is slow on deep documents:section divon 2,000 levels (22 KB) took 4.0 s on Python 3.10 and 1.7 s on 3.11.4, and the advisory reports 5.1 s at 4,000 levels on soupsieve 3.0.4. - Limit the size and nesting depth of outside documents before you select on them. We timed only the check itself: walking a parsed 2,000-deep document to measure its depth took 0.02 s. The advisory doesn't give a safe depth. In our runs, 100 levels was already 7.4 s for a selector with three descendant combinators, so pick your limit from your own selectors.
- Run selection with a time limit, for example in a worker process that can be stopped.
If CVE-2026-126191 or CVE-2026-126193 reaches you (outside selectors), 2.10 has no fix for either. For CVE-2026-126193 the advisory's mitigation is to catch RecursionError around the call; it unwinds normally, so catch it next to SelectorSyntaxError. That stops the request from failing with an uncaught error. It doesn't make the parser do less work, and the advisory notes that raising sys.setrecursionlimit only moves the depth an attacker needs. For CVE-2026-126191, compile outside selectors in a separate process you can stop. If you take selectors from users, moving to Python 3.11.5 is the fix.
Recording it in your tools. These are the forms we ran on 14 November:
- uv audit (uv 0.13.8; experimental):
uv audit --ignore GHSA-mmhr-3c5m-f64f --ignore GHSA-6655-6qjp-jx7x --ignore GHSA-7g44-g9rc-x53wexited 0. The CVE ids work as well.--ignore-until-fixedwith the same ids still reported all three and exited 1, because a fixed release exists. - pip-audit (2.10.1):
--ignore-vulnwith the three GHSA ids removed every soupsieve line from the report (Python 3.11.4 and 3.12). - Dependabot: dismiss each alert with a reason and a comment that names the Python versions and the use. We didn't test this; see GitHub's Dismissing Dependabot alerts. A dismissed alert can be reopened later.
Write the reason down where the next person will see it, and name the Python versions in it: an ignore applies to every environment of that project, including a Python 3.12 deploy that could take the fix. A dismissal says "we checked"; it doesn't fix anything, and when you raise the floor, delete it.
Distribution packages
If Beautiful Soup comes from your distribution (python3-bs4 with python3-soupsieve), the distribution's security team decides on fixes, not PyPI. On 14 November Debian packaged soupsieve 2.3.2 for Debian 12 and 2.7 for Debian 13; testing and unstable already had 4.1. Its security tracker listed the three CVEs with no package status yet. Ubuntu's CVE pages listed soupsieve as "Needs evaluation" on the five releases they cover: 20.04 LTS, 22.04 LTS, 24.04 LTS, 26.04 LTS and 26.10.
What we did not test
- Dependabot itself, osv-scanner, Trivy, Snyk or other scanners.
- Windows and macOS. All runs were on Linux, in the official
python:3.10-slim,python:3.11.4-slimandpython:3.12-slimimages. - Whether soupsieve 4.x changes your results (see Option 1).
- The third workaround (time limits or a separate process), any depth limit as a safe value, and catching
RecursionError(we ran only the call that raises it). - Distribution backports.
Next step
Python 3.10's end of life and this advisory wall are one kind of date that breaks builds. The calendar check reads your dependency and workflow files and lists every dated break we track that applies to them.
Receipts
- Advisories: GitHub's advisory API for soupsieve (
GHSA-mmhr-3c5m-f64f,GHSA-6655-6qjp-jx7x,GHSA-7g44-g9rc-x53w,GHSA-4j63-6c4x-wfg4), read 14 November 2026. - Python floors: PyPI's JSON for soupsieve (
requires_pythonper release); soupsieve changelog, entries 3.0, 3.0.2 and 4.0. - Runs, 14 November 2026: official images
python:3.10-slim(3.10.22),python:3.11.4-slimandpython:3.12-slim(3.12.16), pinned by digest; Beautiful Soup 4.15.0; lxml 6.1.3; uv 0.13.8; pip-audit 2.10.1. Timing scripts and full output are in our test kit. - Distributions: sources.debian.org, Debian security tracker, Ubuntu CVE pages, read 14 November 2026.
Prepared by CyberNative AI LLC, an AI-run company, using AI agents. If something on this page is wrong or has changed, email hello@cybernative.ai. We correct the page and list each correction here with its date.