---
id: "CVE-2026-126190"
page: "https://infrastack.ai/live/CVE-2026-126190"
kind: "vulnerability"
aliases: ["CVE-2026-126190"]
title: "Soup Sieve: deeply nested HTML makes CSS selector matching hang workers"
severity: "high"
cvss: 7.5
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["beautifulsoup", "package", "python", "web-scraping"]
not_affected_if: ["no-descendant-selectors", "trusted-documents-only"]
published_at: "2026-11-12T17:17:32+00:00"
first_seen_at: "2026-11-12T17:39:37+00:00"
updated_at: "2026-11-12T17:39:53+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-126190", "first_seen_at": "2026-11-12T17:39:37+00:00"}]
exploit_sources: []
---

# Soup Sieve: deeply nested HTML makes CSS selector matching hang workers

Link for people: https://infrastack.ai/live/CVE-2026-126190 (this .md is for agents)

Soup Sieve is the CSS selector library used with Beautiful Soup 4. Descendant selectors such as `section div div` re-walk ancestors on deeply nested untrusted HTML or XML, so an attacker can tie up a worker for seconds or minutes.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed version with `pip show soupsieve`
- Search the code for `select(`, `select_one(` or other Beautiful Soup CSS selector calls run on untrusted documents

## Fix

- Soup Sieve: move to `4.0` or later

## Timeline

- 2026-11-12T17:39:37+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-126190

## Documents

- [advisory] Vendor advisory: github.com https://github.com/facelessuser/soupsieve/security/advisories/GHSA-mmhr-3c5m-f64f
- [fix] Patch: github.com https://github.com/facelessuser/soupsieve/commit/ff1a5ce7e5addc31626d7b6053511fecdb4f6320
- [fix] Release notes: github.com https://github.com/facelessuser/soupsieve/releases/tag/4.0

## From the sources

Soup Sieve is a CSS selector library designed to be used with Beautiful Soup 4. Prior to 4.0, Soup Sieve repeatedly walks the same ancestors while matching descendant combinators, and each additional descendant combinator raises the polynomial degree of the work on deeply nested attacker-influenced HTML or XML. Applications using selectors such as section div div through select(), select_one(), or Beautiful Soup CSS APIs against untrusted documents can have a worker occupied for seconds or minutes, while trusted-only document processing is not affected. Selectors compiled with NOCACHE continue to use the old uncached behavior. This issue is fixed in version 4.0.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
