Skip to main content

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)

0
Low
Published: 02/14/2025 (02/14/2025, 18:30:51 UTC)
Source: GCVE Database

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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
Low
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
Low
Vuln. Availability
Low
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
Scope
X
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/14/2026, 23:02:30 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses