CVE-2025-12084: When building nested elements using xml.dom.minidom methods such as appendChild() that have a dependency on _clear_id_cache() the algorithm is quadratic.
Medium CVSS 5.3
- CVE id
- CVE-2025-12084
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| Python Runtimes and servers |
< 3.13.11 >= 3.14.0, < 3.14.2 |
3.13.11, 3.14.2 |
Versions we track that it affects: Python 3.12.16
How to fix it
Upgrade Python to the fixed release of the line you run: 3.13.11, 3.14.2.
python --version
- Install the patched Python release of your minor line (pyenv, the python image tag, or your OS packages) and recreate virtual environments.
A free AIssue account reads the runtime versions your repositories pin (version files, Dockerfiles, build files) and tells you when one is affected.
Details
When building nested elements using xml.dom.minidom methods such as appendChild() that have a dependency on clearid_cache() the algorithm is quadratic. Availability can be impacted when building excessively nested documents.
References
- CVE-2025-12084 on the NVD
- Advisory: https://nvd.nist.gov/vuln/detail/CVE-2025-12084
- Web: https://github.com/python/cpython/commit/027f21e417b26eed4505ac2db101a4352b7c51a0
- Web: https://github.com/python/cpython/commit/08d8e18ad81cd45bc4a27d6da478b51ea49486e4
- Web: https://github.com/python/cpython/commit/27648a1818749ef44c420afe6173af6868715437
- Web: https://github.com/python/cpython/commit/41f468786762348960486c166833a218a0a436af
- Web: https://github.com/python/cpython/commit/57937a8e5e293f0dcba5115f7b7a11b1e0c9a273
- Web: https://github.com/python/cpython/commit/8d2d7bb2e754f8649a68ce4116271a4932f76907
- Web: https://github.com/python/cpython/commit/9c9dda6625a2a90d2a06c657eee021d6be19842d
- Web: https://github.com/python/cpython/commit/a46c10ec9d4050ab67b8a932e0859a2ea60c3cb8
- Web: https://github.com/python/cpython/commit/a696ba8b4d42fd632afc9bc88ad830a2e4cceed8
- Web: https://github.com/python/cpython/commit/c97e87593063d84a2bd9fe7068b30eb44de23dc0
- Web: https://github.com/python/cpython/commit/ddcd2acd85d891a53e281c773b3093f9db953964
- Web: https://github.com/python/cpython/commit/e91c11449cad34bac3ea55ee09ca557691d92b53
- Web: https://github.com/python/cpython/issues/142145
- Web: https://github.com/python/cpython/pull/142146
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: National Vulnerability Database (NVD) (public domain). Severity comes from the advisory's own rating when it has one, else from its CVSS score.