CVE-2026-0864 PUBLISHED

Configuration Injection via Carriage Return (\r) in write() method

Assigner: PSF
Reserved: 12.01.2026 Published: 23.06.2026 Updated: 24.06.2026

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.

Metrics

CVSS 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
CVSS Score: 4.1

Product Status

Vendor Python Software Foundation
Product CPython
Versions Default: unaffected
  • affected from 0 to 3.15.0 (excl.)

Credits

  • D0n9 (https://github.com/D0n9) reporter
  • Petr Viktorin (https://github.com/encukou) remediation reviewer
  • Seth Larson (https://github.com/sethmlarson) coordinator

References