CVE-2024-3220
CVE-2024-3220 — Default mimetype known files writeable on Windows
There is a defect in the CPython standard library module “mimetypes” where on Windows the default list of known file locations are writable meaning other users can create invalid files to cause MemoryError to be raised on Python runtime startup or have file extensions be interpreted as the incorrect file type. This defect is caused by the default locations of Linux and macOS platforms (such as “/etc/mime.types”) also being used on Windows, where they are user-writable locations (“C:\etc\mime.types”). To work-around this issue a user can call mimetypes.init() with an empty list (“[]”) on Windows platforms to avoid using the default list of known file locations.
Published Updated Sources: cvelistV5, PSF
Triage
Is it exploited, how likely is exploitation, what does it touch, and how severe do the scoring sources call it.
Exploitation
Unreported
no source claims exploitation
EPSS
<1%
chance of exploitation in 30 days
CVSS base
2.3
LOW
CISA SSVC assessment
Three decision points CISA publishes for the CVEs it assesses · SSVC 2.0.3. A stakeholder decision, not a severity score.
Exploitation
None
none · proof-of-concept · active
Automatable
No
can an attacker script all four kill-chain steps
Technical impact
Partial
partial · total control of the vulnerable component
Affected scope
The catalog records vendors and products as separate lists, not pairs, so which product belongs to which vendor is not something this page can say.
Vendors (1)
Products (1)
Every base score collected
Sources score independently and disagree; each row says who scored it and under which version.
| Score | Version | Severity | Expl. | Impact | Source |
|---|---|---|---|---|---|
| 2.3 | CVSS 4.0 | LOW | n/a | n/a | cvelistV5 |
Weakness & attack patterns
- CWE-426
Attack patterns reported against this CVE. The ATT&CK techniques below are inferred from its weakness class.
- T1574.007Hijack Execution Flow: Path Interception by PATH Environment Variable
- T1574.009Hijack Execution Flow: Path Interception by Unquoted Path
Detection
Read off the CVSS vector and the weakness class. Starting points, not rules we have tested.
- Search application, proxy, and WAF logs for requests touching /etc/mime.types.
References
10 on the record
- mail.python.org/archives/list/[email protected]/thread/CDXW34ND2LSAOYAR5N6UNONP4ZBX4D6R/
vendor-advisory
- github.com/python/cpython/issues/159428
issue-tracking
- github.com/python/cpython/commit/04a29bf8f9ff8526cd96cb7368400173303a390a
patch
- github.com/python/cpython/commit/5550519259656cbb8eeac09e3dbc0d5c248a4dea
patch
- github.com/python/cpython/commit/76f4555c4ff10f5dda58d6528c17787df41e256c
patch
- github.com/python/cpython/commit/2f00690fd5a75305e02c99628a41439179266f29
patch
- github.com/python/cpython/commit/35dd324f6e30735162a68cde84bb04a169004325
patch
- github.com/python/cpython/commit/8d4286a3f41d36f42c4b4cf5c4451a5a8c23fe87
patch
Related CVEs
Same product first, then the same weakness or threat actor.
- CVE-2026-115557 Distrust compromised intermediate certificates in ssl moduleCVSS 9.4
- CVE-2022-23748 Dante Discovery Process Control VulnerabilityCVSS 7.8 · CISA KEV
- CVE-2022-22047 Microsoft Windows Client Server Runtime Subsystem (CSRSS) Privilege Escalation VulnerabilityCVSS 7.2 · CISA KEV
- CVE-2012-1854 Microsoft Visual Basic for Applications Insecure Library Loading VulnerabilityCVSS 6.9 · CISA KEV
- CVE-2026-121720 OpenVPN 2.4.0 through 2.6.23 and 2.7_alpha1 through 2.7.8 on Windows allows local authenticated users to execute arbitrary code via a…CVSS 8.5
Elsewhere on this site
- Python Software Foundationevery CVE for this vendor
- CWE-426other pages naming this weakness
Not in any source we poll
Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.
- No confirmed IOCs, IP addresses, domains, file hashes, or malware artifacts supplied.
- No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
- No exploit packet captures, log samples, or incident case IDs supplied.