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.
CVE-2024-3220
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: cve:CVE-2024-3220
CPython
Source reference: /containers/cna/affected/0/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"repo": "https://github.com/python/cpython",
"vendor": "Python Software Foundation",
"modules": [
"mimetypes"
],
"product": "CPython",
"versions": [
{
"status": "affected",
"version": "0",
"lessThan": "3.14.9",
"versionType": "python"
},
{
"status": "affected",
"version": "3.15.0",
"lessThan": "3.15.1",
"versionType": "python"
},
{
"status": "affected",
"version": "3.16.0a1",
"lessThan": "3.16.0",
"versionType": "python"
}
],
"defaultStatus": "unaffected"
}
]- Related CVEs
- CVE-2024-3220
Source reference:
/cveMetadata/cveId
Publisher severity
low
Source reference: /containers/cna/metrics
- Event
- #50031 · Revision 1
- Added to Heist Feed
- Publisher date