CVE-2025-12084: Python Software Foundation CPython · Vulnerability
Affects Python Software Foundation CPythonSource CVE Database V5
Not known to be exploited · CVSS 6.3 Medium.
Data as of 25 Oct 2026, 19:02 UTC
- EPSS
- 0.7% chance of exploitation in 30 days – higher than 56% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 3 Dec 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-25.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
GitHubpython/cpythonpkg:github/python/cpythonOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
To mitigate CVE-2025-12084, organizations should implement several specific measures beyond generic advice: 1) Monitor and restrict the complexity and depth of XML documents accepted by applications using xml.dom.minidom, employing XML schema validation or custom logic to reject excessively nested structures. 2) Where feasible, replace xml.dom.minidom with more efficient XML parsing libraries that do not exhibit quadratic behavior or that provide built-in protections against deeply nested XML. 3) Implement resource usage limits (CPU and memory) on processes handling XML parsing to contain potential denial of service impacts. 4) Employ network-level protections such as rate limiting and input validation to reduce exposure to crafted XML payloads. 5) Stay alert for official patches or updates from the Python Software Foundation and apply them promptly once available. 6) In environments processing untrusted XML, consider sandboxing or isolating XML parsing components to minimize the blast radius of potential DoS attacks. 7) Conduct code reviews and testing focused on XML handling to identify and remediate similar inefficiencies or vulnerabilities.
Description
When building nested elements using xml.dom.minidom methods such as appendChild() that have a dependency on _clear_id_cache() the algorithm is quadratic. Availability can be impacted when building excessively nested documents.
References
- github.com/python/cpython/pull/142146 (opens in a new tab)
- github.com/python/cpython/issues/142145 (opens in a new tab)
- github.com/python/cpython/commit/08d8e18ad81cd45bc4a27d6da478b51ea49486e4 (opens in a new tab)
- github.com/python/cpython/commit/027f21e417b26eed4505ac2db101a4352b7c51a0 (opens in a new tab)
- github.com/python/cpython/commit/ddcd2acd85d891a53e281c773b3093f9db953964 (opens in a new tab)
- github.com/python/cpython/commit/27648a1818749ef44c420afe6173af6868715437 (opens in a new tab)
- github.com/python/cpython/commit/8d2d7bb2e754f8649a68ce4116271a4932f76907 (opens in a new tab)
- github.com/python/cpython/commit/9c9dda6625a2a90d2a06c657eee021d6be19842d (opens in a new tab)
- github.com/python/cpython/commit/a696ba8b4d42fd632afc9bc88ad830a2e4cceed8 (opens in a new tab)
- github.com/python/cpython/commit/41f468786762348960486c166833a218a0a436af (opens in a new tab)
- github.com/python/cpython/commit/57937a8e5e293f0dcba5115f7b7a11b1e0c9a273 (opens in a new tab)
- github.com/python/cpython/commit/e91c11449cad34bac3ea55ee09ca557691d92b53 (opens in a new tab)
- github.com/python/cpython/commit/a46c10ec9d4050ab67b8a932e0859a2ea60c3cb8 (opens in a new tab)
- github.com/python/cpython/commit/c97e87593063d84a2bd9fe7068b30eb44de23dc0 (opens in a new tab)