CVE-2026-0864
JSON

4.1medium

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

Severity
4.1medium CVSS:4.0 by PSF
Exploit likelihood
0.13% (higher than 2% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
PSF
Also known as
PSF-2026-29BIT-LIBPYTHON-2026-0864BIT-PYTHON-2026-0864BIT-PYTHON-MIN-2026-0864

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.

Affected

Product or packageVersionsReported by
Python Software Foundation CPythonbefore 3.10.21, from 3.11.0 before 3.11.16, from 3.12.0 before 3.12.14, from 3.13.0 before 3.13.15, from 3.14.0 before 3.14.7, from 3.15.0a1 before 3.15.0b4CVE List
https://github.com/python/cpythonbefore 5858e42c539dac8394636a6e9b30472b8994851f, before 0adb386f6e68eb2e73d32e19f235d012df009528, before 71f2e02a52d47417a6fd69f456346cd8aa7aca98, before aaf850fd333cd89e9aada03d92aaa788a6cb1bb8, before db4a157c790479710a1a840d7937c5c815a6f8b6, before 12dcbd74d3563016a8cb8c47e4898889f34f74dd, before 274de100bbf4345bd0c23ef5b446722e9e636908Python Software Foundation
python pythonbefore 3.10.21, from 3.11.0 before 3.11.16, from 3.12.0 before 3.12.14, from 3.13.0 before 3.13.15, from 3.14.0 before 3.14.7, 3.15.0NVD
libpython (Bitnami)before 3.10.21, from 3.11.0 before 3.11.16, from 3.12.0 before 3.12.14, from 3.13.0 before 3.13.15, from 3.14.0 before 3.14.7Bitnami Vulnerability Database
python (Bitnami)before 3.10.21, from 3.11.0 before 3.11.16, from 3.12.0 before 3.12.14, from 3.13.0 before 3.13.15, from 3.14.0 before 3.14.7Bitnami Vulnerability Database
python-min (Bitnami)before 3.10.21, from 3.11.0 before 3.11.16, from 3.12.0 before 3.12.14, from 3.13.0 before 3.13.15, from 3.14.0 before 3.14.7Bitnami Vulnerability Database

All scores

PSF4.1medium CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
NVD5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
Bitnami Vulnerability Databasemedium rating

Classification

CWE-74

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

Al usar el módulo ’configparser’ para escribir archivos de configuración que contienen valores de texto multilínea con caracteres de retorno de carro (\r), el archivo resultante podría ser inyectado con claves y valores inesperados si el atacante controla el valor escrito.

References

https://github.com/python/cpython/pull/151559fix, issue-tracking, patch, web
https://mail.python.org/archives/list/security-announce@python.org/thread/CV4NE6AFCRJL7XQOHX7J5TSDHUWVWGJS/advisory, mailing-list, vendor-advisory
https://github.com/python/cpython/issues/143927fix, issue-tracking, patch, report
https://github.com/python/cpython/commit/5858e42c539dac8394636a6e9b30472b8994851ffix, patch
https://github.com/python/cpython/commit/0adb386f6e68eb2e73d32e19f235d012df009528fix, patch
https://github.com/python/cpython/commit/71f2e02a52d47417a6fd69f456346cd8aa7aca98fix, patch
https://github.com/python/cpython/commit/aaf850fd333cd89e9aada03d92aaa788a6cb1bb8fix, patch
https://github.com/python/cpython/commit/db4a157c790479710a1a840d7937c5c815a6f8b6fix, patch
https://github.com/python/cpython/commit/12dcbd74d3563016a8cb8c47e4898889f34f74ddfix, patch
https://github.com/python/cpython/commit/274de100bbf4345bd0c23ef5b446722e9e636908fix, patch
https://nvd.nist.gov/vuln/detail/CVE-2026-0864web

Sources

SourceRecordLicence
CVE ListCVE-2026-0864 changed 2026-08-13CVE Terms of Use
Python Software FoundationPSF-2026-29 changed 2026-08-11CC-BY-4.0
NVDCVE-2026-0864 changed 2026-10-25Public domain
Bitnami Vulnerability DatabaseBIT-LIBPYTHON-2026-0864 changed 2026-09-08Apache-2.0
Bitnami Vulnerability DatabaseBIT-PYTHON-2026-0864 changed 2026-09-08Apache-2.0
Bitnami Vulnerability DatabaseBIT-PYTHON-MIN-2026-0864 changed 2026-09-08Apache-2.0