# CVE-2026-15308: Python CPython CPU denial of service in html.parser.HTMLParser

Source: https://junglewise.ai/threats/cve-2026-15308-python-cpython-cpu-denial-of-service-in-html-parser-htmlparser  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-09. Updated: 2026-07-09  
License: CC BY 4.0 with a link back

CVE-2026-15308 · Severity: info · CVSS 10 · Published 2026-07-09

A vulnerability in Python's standard HTML parsing library can allow an attacker to crash or slow down an application by sending specially crafted, incomplete web data. This component is commonly used by web scrapers and servers to process HTML content. An exploit could lead to a total service outage (Denial of Service) by exhausting the server's processing power.

Technologies: [Python Software Foundation CPython](https://junglewise.ai/threats/technologies/cpython). Vendors: [Python Software Foundation](https://junglewise.ai/threats/vendors/python-software-foundation).

## Quick answers

**Is CVE-2026-15308 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-15308 being exploited in the wild.

**How severe is CVE-2026-15308?** Informational severity, with a CVSS score of 10, published 9 July 2026.

**Which products and versions are affected?** Python Software Foundation CPython < 3.16.0.

**Is there a fix for CVE-2026-15308?** A patch was published on 2026-07-04: Fix merged into CPython main branch Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-15308 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-15308?** Check whether you run Python Software Foundation CPython at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The incremental HTML parser (html.parser.HTMLParser) in CPython contains a flaw where processing uncontrolled data with repeated unterminated markup declarations leads to quadratic complexity. When an unterminated construct, such as a tag or comment, spans multiple feed() calls, the parser repeatedly rescans the growing buffer and performs inefficient string concatenations. An unauthenticated remote attacker can exploit this by sending malicious HTML fragments, causing excessive CPU consumption and a Denial of Service. The fix involves accumulating data in a list and only joining/parsing once a sufficient threshold is met to avoid the quadratic overhead. Patches have been backported to versions 3.10 through 3.15.

## Affected products

- Python Software Foundation CPython < 3.16.0

## Timeline

- 2026-07-04: disclosed: Issue reported and PR opened on GitHub
- 2026-07-04: patched: Fix merged into CPython main branch
- 2026-07-09: advisory: CVE-2026-15308 published

## References

- [https://github.com/python/cpython/issues/153030](https://github.com/python/cpython/issues/153030)
- [https://github.com/python/cpython/pull/153031](https://github.com/python/cpython/pull/153031)
- [https://mail.python.org/archives/list/security-announce@python.org/thread/F6453LWKSHKCTWFLCOURWPLETNUIW2Z5/](https://mail.python.org/archives/list/security-announce@python.org/thread/F6453LWKSHKCTWFLCOURWPLETNUIW2Z5/)

## Related threats

- [Python gzip/tarfile/zipfile CLI module shadowing via sys.path](https://junglewise.ai/threats/cve-2026-115791-when-tarfile-or-zipfile-command-line-interface-cli-is-used-to)
- [Python CPython quadratic complexity in xml.etree XPath index predicates](https://junglewise.ai/threats/cve-2026-6879-python-cpython-quadratic-complexity-in-xml-etree-xpath-index)
- [Python CPython improper permission preservation in tarfile.extract](https://junglewise.ai/threats/cve-2026-4360-python-cpython-improper-permission-preservation-in-tarfile-extract)
- [Python CPython infinite loop in tarfile streaming mode](https://junglewise.ai/threats/cve-2026-11972-python-cpython-infinite-loop-in-tarfile-streaming-mode)
- [Python CPython configuration injection in configparser](https://junglewise.ai/threats/cve-2026-0864-python-cpython-configuration-injection-in-configparser)
