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.
Published: 2026-06-23
Score: 4.1 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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.

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

Remediation

No vendor fix or workaround currently provided.

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 yet.

History

Wed, 24 Jun 2026 13:45:00 +0000


Wed, 24 Jun 2026 12:15:00 +0000

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


Tue, 23 Jun 2026 22:15:00 +0000

Type Values Removed Values Added
First Time appeared Python
Python cpython
Vendors & Products Python
Python cpython

Tue, 23 Jun 2026 19:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-74
Metrics ssvc

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


Tue, 23 Jun 2026 18:15:00 +0000

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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: PSF

Published:

Updated: 2026-06-24T12:55:42.471Z

Reserved: 2026-01-12T16:07:55.453Z

Link: CVE-2026-0864

cve-icon Vulnrichment

Updated: 2026-06-23T18:34:40.390Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-06-23T17:42:01Z

Links: CVE-2026-0864 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-06-24T10:30:14Z

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')