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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 4.1
- **CVSS:** 4.1 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Attack requirements: Present; Privileges required: High; User interaction: Passive; Confidentiality impact: None; Integrity impact: High; Availability impact: None; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.18% (percentile 5, 2026-11-26)
- **CWE:** CWE-74
- **Published:** 2026-06-23T17:42:01.947Z
- **Modified:** 2026-10-25T23:10:00.167Z

## Who should check

- Anyone running Python Software Foundation CPython \< 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.15.0a1, \< 3.15.0b4

## 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.

## Affected and fixed versions

- Python Software Foundation CPython: \< 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.15.0a1, \< 3.15.0b4 (cvelist)

## Mitigation

- Upgrade CPython to 3.15.0b4 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-0864. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-0864.md
Affected: Python Software Foundation CPython < 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.15.0a1, < 3.15.0b4
Fixed in: Python Software Foundation CPython 3.10.21, Python Software Foundation CPython 3.11.16, Python Software Foundation CPython 3.12.14, Python Software Foundation CPython 3.13.15, Python Software Foundation CPython 3.14.7, Python Software Foundation CPython 3.15.0b4

Steps:
1. Search this machine and project for Python Software Foundation CPython: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-0864 being exploited?

There is no confirmed exploitation: CVE-2026-0864 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.18% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-0864?

Medium: CVSS 4.1 (v4.0, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2026-0864?

Python Software Foundation CPython \< 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.15.0a1, \< 3.15.0b4.

### Is there a fix for CVE-2026-0864?

Yes. Fixed in Python Software Foundation CPython 3.10.21, Python Software Foundation CPython 3.11.16, Python Software Foundation CPython 3.12.14, Python Software Foundation CPython 3.13.15, Python Software Foundation CPython 3.14.7, Python Software Foundation CPython 3.15.0b4. Upgrade CPython to 3.15.0b4 or later.

### How do I check if I'm affected by CVE-2026-0864?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://mail.python.org/archives/list/security-announce@python.org/thread/CV4NE6AFCRJL7XQOHX7J5TSDHUWVWGJS/>
- patch: <https://github.com/python/cpython/pull/151559>
- patch: <https://github.com/python/cpython/issues/143927>
- patch: <https://github.com/python/cpython/commit/5858e42c539dac8394636a6e9b30472b8994851f>
- patch: <https://github.com/python/cpython/commit/0adb386f6e68eb2e73d32e19f235d012df009528>
- patch: <https://github.com/python/cpython/commit/71f2e02a52d47417a6fd69f456346cd8aa7aca98>
- patch: <https://github.com/python/cpython/commit/aaf850fd333cd89e9aada03d92aaa788a6cb1bb8>
- patch: <https://github.com/python/cpython/commit/db4a157c790479710a1a840d7937c5c815a6f8b6>
- patch: <https://github.com/python/cpython/commit/12dcbd74d3563016a8cb8c47e4898889f34f74dd>
- patch: <https://github.com/python/cpython/commit/274de100bbf4345bd0c23ef5b446722e9e636908>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-0864>

HTML: <https://flawdb.com/CVE-2026-0864> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-0864>
