There is a defect in the CPython standard library module “mimetypes” where on Windows the default list of known file locations are writable meaning… (CVE-2024-3220)
Description
A defect in the CPython standard library module "mimetypes" on Windows causes the default list of known file locations to be writable by users. This allows other users to create invalid files that can cause a MemoryError during Python runtime startup or cause file extensions to be interpreted incorrectly. The issue arises because default locations used on Linux and macOS (e.g., "/etc/mime.types") are also used on Windows, where these paths are user-writable (e.g., "C:\etc\mime.types").
CVSS v4.0
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2024-3220 describes a vulnerability in the CPython standard library's mimetypes module on Windows platforms. The module uses default file locations for MIME type definitions that are writable by users on Windows, unlike on Linux or macOS. This writable state enables other users to create or modify files in these locations, potentially causing a MemoryError on Python startup or incorrect MIME type interpretation. The defect stems from reusing Linux/macOS default paths on Windows where the directories are user-writable. A workaround is to call mimetypes.init() with an empty list on Windows to avoid using these default locations.
Potential Impact
The vulnerability may cause Python runtime startup to raise a MemoryError or result in incorrect file type interpretation due to manipulated MIME type files. This can affect applications relying on the mimetypes module for file type detection. There is no indication of remote code execution or privilege escalation. The impact is limited to denial of service or incorrect behavior in MIME type handling.
Mitigation Recommendations
No official patch or fix is currently documented. As a workaround, users on Windows can call mimetypes.init() with an empty list ([]) to prevent the module from using the default writable file locations. This avoids the vulnerability by not loading MIME type definitions from user-writable paths. Monitor official CPython advisories for any future patches.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-74p9-4v44-wwx5
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2024-3220"]
- Database Specific Severity
- LOW
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6ad0089e2cdf04f656b90d69
Added to database: 10/14/2026, 22:56:30 UTC
Last enriched: 10/14/2026, 23:02:30 UTC
Last updated: 10/15/2026, 02:48:08 UTC
Views: 8
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.