PSF-2026-29: 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 to write configuration files containing multi-line values and an attacker can control a value that includes a carriage return character (\r). The impact is limited to the generated configuration file, where unexpected keys and values may be injected.
What access does an attacker need to exploit it?
The attacker needs influence over a value passed to configparser's write() method and must be able to include a carriage return in that value. The supplied severity vector also indicates local access, high privileges, and user interaction are required.