---
id: "CVE-2026-126192"
page: "https://infrastack.ai/live/CVE-2026-126192"
kind: "vulnerability"
aliases: ["CVE-2026-126192"]
title: "Soup Sieve: crafted selector with :has() can stall CSS matching"
severity: "medium"
cvss: 6.3
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["beautifulsoup", "package", "python", "soupsieve"]
not_affected_if: ["adjacent-sibling-only", "no-has-selector", "trusted-input-only"]
published_at: "2026-11-12T17:17:32+00:00"
first_seen_at: "2026-11-12T17:39:38+00:00"
updated_at: "2026-11-12T17:40:01+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-126192", "first_seen_at": "2026-11-12T17:39:38+00:00"}]
exploit_sources: []
---

# Soup Sieve: crafted selector with :has() can stall CSS matching

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

Soup Sieve, a CSS selector library used with Beautiful Soup 4, does quadratic work when a developer-written selector places the general sibling combinator inside :has(). An attacker supplying HTML can tie up a worker for minutes with a small document.

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

## How to check

- Look for `soupsieve` in the lockfile or installed packages, for example `pip show soupsieve`.
- Check whether the application evaluates selectors such as `div:has(a ~ b)` against untrusted markup.

## Fix

- Soup Sieve `2.10` (fixed version named in the description).

## Timeline

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

## Documents

- [advisory] Vendor advisory: github.com https://github.com/facelessuser/soupsieve/security/advisories/GHSA-4j63-6c4x-wfg4
- [fix] Patch: github.com https://github.com/facelessuser/soupsieve/commit/ffb88cca745c591224f74a8e86414a85e8f35fc0
- [fix] Release notes: github.com https://github.com/facelessuser/soupsieve/releases/tag/2.10

## From the sources

Soup Sieve is a CSS selector library designed to be used with Beautiful Soup 4. Prior to 2.10, matching a developer-authored selector that places the general sibling combinator inside :has() repeatedly scans each candidate element's following siblings when the right-hand side is absent, producing quadratic work on attacker-controlled HTML. Applications that evaluate a fixed selector such as div:has(a ~ b) over untrusted markup can have a worker occupied for minutes by a small document, while the adjacent sibling form and trusted-only document processing are not affected in the same way. This issue is fixed in version 2.10.

---

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