# CVE-2026-0864: Configuration Injection via Carriage Return (\r) in write() method

- Severity: Medium 4.1 (CVSS:4.0, scored by PSF) `CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.13%, higher than 2% of CVEs (2026-12-01)
- Published: 2026-06-23T17:42:01.947Z
- Modified: 2026-10-25T23:10:00.167Z
- Also known as: PSF-2026-29, BIT-LIBPYTHON-2026-0864, BIT-PYTHON-2026-0864, BIT-PYTHON-MIN-2026-0864
- Weaknesses: CWE-74
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: PSF

## Description

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.

(As written by CVE List.)

## Affected

- Python Software Foundation CPython: before 3.10.21; from 3.11.0 before 3.11.16; from 3.12.0 before 3.12.14; from 3.13.0 before 3.13.15; from 3.14.0 before 3.14.7; from 3.15.0a1 before 3.15.0b4
- https://github.com/python/cpython: before 5858e42c539dac8394636a6e9b30472b8994851f; before 0adb386f6e68eb2e73d32e19f235d012df009528; before 71f2e02a52d47417a6fd69f456346cd8aa7aca98; before aaf850fd333cd89e9aada03d92aaa788a6cb1bb8; before db4a157c790479710a1a840d7937c5c815a6f8b6; before 12dcbd74d3563016a8cb8c47e4898889f34f74dd; before 274de100bbf4345bd0c23ef5b446722e9e636908
- python python: before 3.10.21; from 3.11.0 before 3.11.16; from 3.12.0 before 3.12.14; from 3.13.0 before 3.13.15; from 3.14.0 before 3.14.7; 3.15.0
- libpython (Bitnami): before 3.10.21; from 3.11.0 before 3.11.16; from 3.12.0 before 3.12.14; from 3.13.0 before 3.13.15; from 3.14.0 before 3.14.7
- python (Bitnami): before 3.10.21; from 3.11.0 before 3.11.16; from 3.12.0 before 3.12.14; from 3.13.0 before 3.13.15; from 3.14.0 before 3.14.7
- python-min (Bitnami): before 3.10.21; from 3.11.0 before 3.11.16; from 3.12.0 before 3.12.14; from 3.13.0 before 3.13.15; from 3.14.0 before 3.14.7

## Every score

- PSF: CVSS:4.0 4.1 Medium `CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N`
- Bitnami Vulnerability Database: rating Medium

## References

- <https://github.com/python/cpython/pull/151559> (fix, issue-tracking, patch, web)
- <https://mail.python.org/archives/list/security-announce@python.org/thread/CV4NE6AFCRJL7XQOHX7J5TSDHUWVWGJS/> (advisory, mailing-list, vendor-advisory)
- <https://github.com/python/cpython/issues/143927> (fix, issue-tracking, patch, report)
- <https://github.com/python/cpython/commit/5858e42c539dac8394636a6e9b30472b8994851f> (fix, patch)
- <https://github.com/python/cpython/commit/0adb386f6e68eb2e73d32e19f235d012df009528> (fix, patch)
- <https://github.com/python/cpython/commit/71f2e02a52d47417a6fd69f456346cd8aa7aca98> (fix, patch)
- <https://github.com/python/cpython/commit/aaf850fd333cd89e9aada03d92aaa788a6cb1bb8> (fix, patch)
- <https://github.com/python/cpython/commit/db4a157c790479710a1a840d7937c5c815a6f8b6> (fix, patch)
- <https://github.com/python/cpython/commit/12dcbd74d3563016a8cb8c47e4898889f34f74dd> (fix, patch)
- <https://github.com/python/cpython/commit/274de100bbf4345bd0c23ef5b446722e9e636908> (fix, patch)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-0864> (web)

## Sources

- CVE List: [CVE-2026-0864](https://www.cve.org/CVERecord?id=CVE-2026-0864), CVE Terms of Use, modified 2026-08-13
- Python Software Foundation: [PSF-2026-29](https://osv.dev/vulnerability/PSF-2026-29), CC-BY-4.0, modified 2026-08-11
- NVD: [CVE-2026-0864](https://nvd.nist.gov/vuln/detail/CVE-2026-0864), Public domain, modified 2026-10-25
- Bitnami Vulnerability Database: [BIT-LIBPYTHON-2026-0864](https://osv.dev/vulnerability/BIT-LIBPYTHON-2026-0864), Apache-2.0, modified 2026-09-08
- Bitnami Vulnerability Database: [BIT-PYTHON-2026-0864](https://osv.dev/vulnerability/BIT-PYTHON-2026-0864), Apache-2.0, modified 2026-09-08
- Bitnami Vulnerability Database: [BIT-PYTHON-MIN-2026-0864](https://osv.dev/vulnerability/BIT-PYTHON-MIN-2026-0864), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2026-0864 · Whole record: https://cve.day/CVE-2026-0864.json · Rebuilt by cve.day 2026-11-25T22:59:25.492Z
