CVE-2024-6923
Email header injection due to unquoted newlines
Check your servers for CVE-2024-6923
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-6923 affects cpython, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
There is a MEDIUM severity vulnerability affecting CPython.
The email module didn’t properly quote newlines for email headers when serializing an email message allowing for header injection when an email is serialized.
Severity (CVSS)
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- required: a user has to do something, such as open a link or a file
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality low, integrity low, availability low: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 1.70%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 77.6% of all scored CVEs. Scores of 29 Nov 2026.
The assessment of CISA (SSVC, 1 Aug 2024):
- Exploitation
- poc: a proof of concept is public
- Automatable
- no: each attack takes manual steps
- Technical impact
- total: full control of the component or of its data
Weakness
- CWE-94 Improper Control of Generation of Code
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| CPython |
affected before 3.8.20 affected from 3.9.0, before 3.9.20 affected from 3.10.0, before 3.10.15 affected from 3.11.0, before 3.11.10 affected from 3.12.0, before 3.12.5 affected from 3.13.0a1, before 3.13.0rc2
Other versions: unaffected
|
Is my server affected?
Find the installed version of cpython and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i cpython
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2024-6923 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2024-6923RHEL, Rocky, Alma, Fedora
rpm -q cpython
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2024-6923Alpine
apk list --installed | grep -i cpythonWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2024-6923
trivy image --scanners vuln IMAGE | grep CVE-2024-6923
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- https://mail.python.org/archives/list/security-announce@python.org/thread/QH3BUOE2DYQBWP7NAQ7UNHPPOELKISRW/ mail.python.org · vendor advisory
Patches and release notes
- https://github.com/python/cpython/pull/122233 github.com · patch
- https://github.com/python/cpython/commit/4766d1200fdf8b6728137aa2927a297e224d5fa7 github.com · patch
- https://github.com/python/cpython/commit/4aaa4259b5a6e664b7316a4d60bdec7ee0f124d0 github.com · patch
- https://github.com/python/cpython/commit/06f28dc236708f72871c64d4bc4b4ea144c50147 github.com · patch
- https://github.com/python/cpython/commit/b158a76ce094897c870fb6b3de62887b7ccc33f1 github.com · patch
- https://github.com/python/cpython/commit/f7be505d137a22528cb0fc004422c0081d5d90e6 github.com · patch
- https://github.com/python/cpython/commit/f7c0f09e69e950cf3c5ada9dbde93898eb975533 github.com · patch
- https://github.com/python/cpython/commit/097633981879b3c9de9a1dd120d3aa585ecc2384 github.com · patch
Other references
- https://github.com/python/cpython/issues/121650 github.com · issue tracking
- http://www.openwall.com/lists/oss-security/2024/08/01/3 openwall.com
- http://www.openwall.com/lists/oss-security/2024/08/02/2 openwall.com
- https://security.netapp.com/advisory/ntap-20240926-0003/ security.netapp.com
- https://lists.debian.org/debian-lts-announce/2025/01/msg00005.html lists.debian.org
- https://lists.debian.org/debian-lts-announce/2024/12/msg00000.html lists.debian.org
Source: the record CVE-2024-6923 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse