CVE-2026-0864: When using the "configparser" module to write configuration files containing multi-line text values with carriage return characters (\r) the resulting file could be injected with unexpected keys...
Medium CVSS 5.5
- CVE id
- CVE-2026-0864
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| Python Runtimes and servers |
< 3.10.21 >= 3.11.0, < 3.11.16 >= 3.12.0, < 3.12.14 >= 3.13.0, < 3.13.15 >= 3.14.0, < 3.14.7 |
3.10.21, 3.11.16, 3.12.14, 3.13.15, 3.14.7 |
How to fix it
Upgrade Python to the fixed release of the line you run: 3.10.21, 3.11.16, 3.12.14, 3.13.15, 3.14.7.
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 using the "configparser" module to write configuration files containing multi-line text values with carriage return characters (\r) the resulting file could be injected with unexpected keys and values if the attacker controls the written value.
References
- CVE-2026-0864 on the NVD
- Advisory: https://nvd.nist.gov/vuln/detail/CVE-2026-0864
- Web: https://github.com/python/cpython/commit/0adb386f6e68eb2e73d32e19f235d012df009528
- Web: https://github.com/python/cpython/commit/12dcbd74d3563016a8cb8c47e4898889f34f74dd
- Web: https://github.com/python/cpython/commit/274de100bbf4345bd0c23ef5b446722e9e636908
- Web: https://github.com/python/cpython/commit/5858e42c539dac8394636a6e9b30472b8994851f
- Web: https://github.com/python/cpython/commit/71f2e02a52d47417a6fd69f456346cd8aa7aca98
- Web: https://github.com/python/cpython/commit/aaf850fd333cd89e9aada03d92aaa788a6cb1bb8
- Web: https://github.com/python/cpython/commit/db4a157c790479710a1a840d7937c5c815a6f8b6
- Web: https://github.com/python/cpython/issues/143927
- Web: https://github.com/python/cpython/pull/151559
- Web: https://mail.python.org/archives/list/security-announce@python.org/thread/CV4NE6AFCRJL7XQOHX7J5TSDHUWVWGJS/
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.