# CVE-2026-0864: Python CPython configuration injection in configparser

Source: https://junglewise.ai/threats/cve-2026-0864-python-cpython-configuration-injection-in-configparser  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-23. Updated: 2026-06-23  
License: CC BY 4.0 with a link back

CVE-2026-0864 · Severity: info · CVSS 4.1 · Published 2026-06-23

A vulnerability exists in the Python standard library's configuration file parser, which is used by developers to read and write settings files. If an application allows untrusted users to provide text that is then saved into a configuration file, those users could inject unauthorized settings or modify existing ones. This could lead to unauthorized changes in how an application behaves or bypass security controls that rely on those configuration files.

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-0864 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-0864 being exploited in the wild.

**How severe is CVE-2026-0864?** Informational severity, with a CVSS score of 4.1, published 23 June 2026.

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

**Is there a fix for CVE-2026-0864?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-0864 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-0864?** 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

A configuration injection vulnerability exists in the Python 'configparser' module's write() method. The root cause is insufficient normalization of line endings; while the module correctly handles newline characters (\n) by indenting them for multi-line values, it fails to properly handle carriage return characters (\r). An attacker with the ability to provide input that is subsequently written to a configuration file can use \r characters to terminate a value and start a new, unauthorized configuration key or section. This is reachable if an application uses configparser to persist user-controlled data. The issue is addressed by normalizing all line endings (CR, CRLF, and LF) to the standard LF+TAB format during the write operation. Patches are available in CPython versions 3.10 through 3.14, with a full fix in 3.15.0.

## Affected products

- Python Software Foundation CPython < 3.15.0

## Timeline

- 2026-01-16: disclosed: Issue reported on GitHub
- 2026-06-23: advisory: Security announcement published by Python Software Foundation

## References

- [https://github.com/python/cpython/commit/5858e42c539dac8394636a6e9b30472b8994851f](https://github.com/python/cpython/commit/5858e42c539dac8394636a6e9b30472b8994851f)
- [https://github.com/python/cpython/issues/143927](https://github.com/python/cpython/issues/143927)
- [https://github.com/python/cpython/pull/151559](https://github.com/python/cpython/pull/151559)
- [https://mail.python.org/archives/list/security-announce@python.org/thread/CV4NE6AFCRJL7XQOHX7J5TSDHUWVWGJS/](https://mail.python.org/archives/list/security-announce@python.org/thread/CV4NE6AFCRJL7XQOHX7J5TSDHUWVWGJS/)

## 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 CPU denial of service in html.parser.HTMLParser](https://junglewise.ai/threats/cve-2026-15308-python-cpython-cpu-denial-of-service-in-html-parser-htmlparser)
- [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)
