Description
`xml.parsers.expat` and `xml.etree.ElementTree` use insufficient entropy for Expat hash-flooding protection, which allows a crafted XML document to trigger hash flooding.\r\n\r\nFully mitigating this vulnerability requires both updating libexpat to 2.8.0 or later and applying this patch.
Published: 2026-05-11
Score: 6.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability exists in the `xml.parsers.expat` and `xml.etree.ElementTree` modules of CPython, where the hash‑flooding protection relies on insufficient randomness. A maliciously crafted XML document can trigger massive hash collisions in the parser’s internal dictionary, exhausting CPU or memory resources and leading to a service interruption. This weakness falls under CWE‑331, representing entropy issues in randomness. The impact is confined to the single process that processes the attacker‑supplied XML, but in a high‑traffic web server or API could be leveraged to cause widespread denial of service across an application or entire system.

Affected Systems

All CPython installations that include the default `xml` package and depend on a libexpat version older than 2.8.0 are potentially affected. The vulnerability affects the Expat parser integrated into CPython and the ElementTree XML library. Site administrators should review the CPython version in use, as newer releases incorporate the patched parser and updated libexpat dependency, and consider upgrading to a version that includes both the language update and the library upgrade.

Risk and Exploitability

The CVSS score of 6.3 indicates a moderate severity. EPSS is not available, so no current estimate of exploitation probability is published. The vulnerability is not listed in the CISA KEV catalog, suggesting it has not yet been observed in the wild. Nevertheless, the easiest attack vector is through any XML input channel exposed to untrusted users, such as web services, configuration files, or document upload endpoints. An attacker can exploit the weakness by sending a carefully crafted XML payload that induces a hash flood, resulting in resource exhaustion and denial of service. Given the lack of a public exploit and the moderate severity, while the risk is significant for exposed XML endpoints, it is lower than for remote code execution or privilege escalation vulnerabilities.

Generated by OpenCVE AI on May 11, 2026 at 20:05 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update the libexpat library to version 2.8.0 or newer to provide sufficient randomness in the hash‑flooding guard.
  • Upgrade CPython to a release that includes the upstream patch for the XML parsers, or apply the patch manually to the `xml` package sources and rebuild the interpreter.
  • Deploy the updated interpreter and restart affected services to apply the hardened XML processing modules.

Generated by OpenCVE AI on May 11, 2026 at 20:05 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 11 May 2026 22:30:00 +0000

Type Values Removed Values Added
References

Mon, 11 May 2026 20:30:00 +0000

Type Values Removed Values Added
References

Mon, 11 May 2026 20:00:00 +0000

Type Values Removed Values Added
First Time appeared Python
Python cpython
Vendors & Products Python
Python cpython

Mon, 11 May 2026 18:00:00 +0000

Type Values Removed Values Added
Description `xml.parsers.expat` and `xml.etree.ElementTree` use insufficient entropy for Expat hash-flooding protection, which allows a crafted XML document to trigger hash flooding.\r\n\r\nFully mitigating this vulnerability requires both updating libexpat to 2.8.0 or later and applying this patch.
Title The expat and elementtree parsers use insufficient entropy for XML hash-flooding protection
Weaknesses CWE-331
References
Metrics cvssV4_0

{'score': 6.3, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: PSF

Published:

Updated: 2026-05-11T20:34:17.811Z

Reserved: 2026-04-27T14:43:40.042Z

Link: CVE-2026-7210

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-05-11T18:16:42.413

Modified: 2026-05-12T14:20:56.547

Link: CVE-2026-7210

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-11T20:15:09Z

Weaknesses