BIT-python-min-2026-0864: Configuration Injection via Carriage Return (\r) in write() method
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 Software
Event History
Frequently Asked Questions
Who is exposed to this issue?
Applications are exposed when they use configparser.write() to generate configuration files from multi-line values that may contain carriage return characters and an attacker can control those values.
What does an attacker need to exploit it?
The attacker needs control over a value that is written through configparser.write(), including the ability to include a carriage return character (\r). Exploitation also depends on the application writing that value into a configuration file.
What is the impact of successful exploitation?
A crafted carriage return in a multi-line value can cause the generated configuration file to contain unexpected keys and values. The reported integrity impact is high, while confidentiality and availability impacts are reported as none.