
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-0864 is a CRLF injection vulnerability in Python's configparser standard library module that allows an attacker who controls multi-line configuration values to inject arbitrary keys and values into written configuration files by embedding carriage return characters (\r). It affects CPython versions prior to 3.15.0, with backports required for the 3.10–3.14 branches. The vulnerability was reported on January 16, 2026 by Seth Michael Larson and publicly disclosed on June 23, 2026. It carries a CVSS v4.0 base score of 4.1 (Medium) as assessed by the Python Software Foundation (Github Advisory, Feedly).
The root cause is improper neutralization of CRLF sequences (CWE-93) and special elements in output used by a downstream component (CWE-74). When configparser's _write_section() method serializes multi-line values, it previously only replaced \n with \n\t to indent continuation lines, but did not handle standalone \r (carriage return) characters. An attacker who controls the value written to a config file can embed \r followed by a new key-value pair (e.g., \rmalicious_key = malicious_value), causing the carriage return to act as a line terminator and inject a new, unintended configuration entry into the output file. The fix normalizes all line endings — \r\n, \r, and \n — to \n\t before writing, as implemented in commit 5858e42 (CPython Commit, CPython Issue).
Successful exploitation allows an attacker to tamper with the integrity of configuration files written by Python applications using configparser. By injecting arbitrary keys and values, an attacker could alter application behavior, override security-sensitive settings, or introduce malicious configuration directives that are subsequently parsed and acted upon by the application or other downstream components. There is no confidentiality or availability impact; the impact is limited to integrity of the configuration file on the local system (Github Advisory, Feedly).
configparser to write configuration files and accepts user-controlled or attacker-influenced input as configuration values.legitimate_value\rinjected_key = injected_value.configparser.write() with the attacker-controlled value, which will serialize the \r as a line terminator, placing injected_key = injected_value on a new line in the output file.\r characters or unexpected line breaks within .ini/.cfg files.The Python Software Foundation has released a fix in CPython commit 5858e42, which normalizes all line endings (\r\n, \r, and \n) to \n\t when writing multi-line configparser values. Backports have been prepared for Python 3.10, 3.11, 3.12, 3.13, 3.14, and 3.15. Users should upgrade to a patched release of CPython as soon as available for their branch. As an interim workaround, applications should sanitize or validate any user-controlled input to remove or escape carriage return characters (\r) before passing values to configparser.write() (CPython Commit, Github Advisory).
The vulnerability was reported by Seth Michael Larson (PSF Security Developer-in-Residence) and disclosed via the Python security announcement mailing list. The fix was reviewed and merged by CPython core developer Petr Viktorin (encukou). No significant broader media coverage or notable community controversy has been observed, consistent with the moderate severity and limited exploitability of the issue (Python Security Announce, CPython Issue).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."