CVE-2026-0864

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

Published Jun 23, 2026 CVSS 4.0 · 4.1 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

When CPython’s configparser module writes configuration files containing multi‑line text that include carriage return characters (\r), the written file can be injected with unexpected keys and values if an attacker supplies the value. This vulnerability essentially allows the attacker to alter configuration data that the target application will later read, potentially changing application settings, disabling security controls, or redirecting logic paths. The weakness is an example of configuration injection (CWE‑74 and CWE‑93).

Affected Systems

All CPython implementations that use the standard library’s configparser.write routine to generate configuration files containing values with carriage return characters are potentially affected. No specific CPython release is isolated in the advisory, so all current and recent releases that have not yet received the patch commit 5858e42c5 are considered vulnerable.

Risk and Exploitability

The CVSS score of 4.1 indicates moderate severity, and the vulnerability is not listed in CISA’s KEV catalog. No EPSS metric is available, but the likelihood of exploitation is limited to environments where an attacker can influence the data written to a configuration file—typically local or application‑level scenarios. No publicly known exploits have been reported, suggesting the exploitability remains low and dependent on trusted input being written to disk.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the CPython patch commit 5858e42c5 to fix the configuration injection bug before a formal release is available.
  • Sanitize any configuration values containing carriage return characters before passing them to configparser.write, ensuring no CR characters are written to the file.
  • Audit the generated configuration files for unexpected or injected keys and values, especially those that influence security‑critical settings.

Generated by OpenCVE AI on June 24, 2026 at 13:44 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Python python
CPEs cpe:2.3:a:python:python:*:*:*:*:*:*:*:*
cpe:2.3:a:python:python:3.15.0:alpha1:*:*:*:*:*:*
cpe:2.3:a:python:python:3.15.0:alpha2:*:*:*:*:*:*
cpe:2.3:a:python:python:3.15.0:alpha3:*:*:*:*:*:*
cpe:2.3:a:python:python:3.15.0:alpha4:*:*:*:*:*:*
cpe:2.3:a:python:python:3.15.0:alpha5:*:*:*:*:*:*
cpe:2.3:a:python:python:3.15.0:alpha6:*:*:*:*:*:*
cpe:2.3:a:python:python:3.15.0:alpha7:*:*:*:*:*:*
cpe:2.3:a:python:python:3.15.0:alpha8:*:*:*:*:*:*
cpe:2.3:a:python:python:3.15.0:beta1:*:*:*:*:*:*
cpe:2.3:a:python:python:3.15.0:beta2:*:*:*:*:*:*
cpe:2.3:a:python:python:3.15.0:beta3:*:*:*:*:*:*
Vendors & Products Python python
Type Values Removed Values Added
Weaknesses CWE-93
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N'}

threat_severity

Moderate

Type Values Removed Values Added
First Time appeared Python
Python cpython
Vendors & Products Python
Python cpython
Type Values Removed Values Added
Weaknesses CWE-74
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title Configuration Injection via Carriage Return (\r) in write() method
References
Metrics cvssV4_0

{'score': 4.1, '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'}

Weaknesses
  • CWE-74

    Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

  • CWE-93

    Improper Neutralization of CRLF Sequences ('CRLF Injection')

Sources

Status
PUBLISHED
Assigner
PSF
Published
Updated
Aug 13, 2026, 12:29 AM
Reserved
Jan 12, 2026, 4:07 PM
Status
Analyzed
Published
Jun 23, 2026, 6:17 PM
Modified
Oct 25, 2026, 11:10 PM
Severity
Moderate
Public date
Jun 23, 2026, 5:42 PM