Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. soupsieve
  4. ›
  5. CVE-2026-49476

CVE-2026-49476: Soup Sieve has Memory Exhaustion via Large Comma-Separated Selector Lists

July 9, 2026

The CSS selector parser in soupsieve (the CSS selector engine for Beautiful Soup 4) allocates unbounded memory when compiling large comma-separated selector lists. An attacker who can supply a crafted CSS selector string to soupsieve.compile() or Beautiful Soup’s .select() / .select_one() can cause the application to allocate hundreds of megabytes of heap memory from a relatively small input, leading to memory exhaustion and denial of service.

To be completely transparent, AI tools helped surface this issue. However, it was independently reproduced and carefully validated. Researchers follow responsible disclosure practices and originally shared this report privately.

A 500 KB selector string triggers allocation of approximately 244 MB of heap memory - a 488x— amplification ratio**.

References

  • github.com/advisories/GHSA-2wc2-fm75-p42x
  • github.com/facelessuser/soupsieve/security/advisories/GHSA-2wc2-fm75-p42x
  • nvd.nist.gov/vuln/detail/CVE-2026-49476

Code Behaviors & Features

Detect and mitigate CVE-2026-49476 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.8.4

Fixed versions

  • 2.8.4

Solution

Upgrade to version 2.8.4 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-400: Uncontrolled Resource Consumption
  • CWE-770: Allocation of Resources Without Limits or Throttling

Source file

pypi/soupsieve/CVE-2026-49476.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:18:07 +0000.