CVE-2024-3220

Default mimetype known files writeable on Windows

Description

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.

Category

2.3
CVSS
Severity: Low
CVSS 4.0 •
EPSS 0.09%
Vendor Advisory python.org
Affected: Python Software Foundation CPython
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2024-3220?
CVE-2024-3220 has been scored as a low severity vulnerability.
How to fix CVE-2024-3220?
To fix CVE-2024-3220, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2024-3220 being actively exploited in the wild?
As for now, there are no information to confirm that CVE-2024-3220 is being actively exploited. According to its EPSS score, there is a ~0% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2024-3220?
CVE-2024-3220 affects Python Software Foundation CPython.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.