Cloudanix VulnDB

CVE-2024-3220

None

CVSS

—

EPSS

0.6%

Published

Feb 14, 2025

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A configuration problem lets other users on Windows create files that can crash Python programs when they start or make the programs misidentify file types.

Exploitation
Local Privilege
Attacker needs
Low Privilege
Complexity
Moderate
Impact
Denial Of Service
Component
Library
Class
Misconfiguration
Remediation
Workaround Only
Effort
Low
Patch risk
Other

What it actually does

The mimetypes module in CPython uses default file locations (such as C:\etc\mime.types) that are writable by unprivileged users on Windows; attackers can place invalid content there to trigger MemoryError during Python interpreter startup or cause file extensions to be mapped to the wrong MIME type.

Why it matters to the business

Python applications and services on Windows may experience unexpected startup failures or incorrect file-type handling, leading to application crashes, disrupted workflows, and potential data-processing errors; urgency is low given stable EPSS and no KEV listing.

How an attack unfolds

An attacker with local access on a Windows system creates or overwrites a file at one of the default writable paths used by mimetypes, supplies malformed MIME data, then waits for any Python process to start and load the module, resulting in a MemoryError or misclassified file types.

How to fix it

Call mimetypes.init([]) at application startup on Windows to bypass default locations; upgrade affected packages to the listed fixed versions (linux-6.1 to 6.1.159-1~deb11u1, linux to 6.17.8-1) where applicable and verify the change in subsequent releases.

How to confirm the fix worked

Confirm mimetypes.init is invoked with an empty list on Windows, verify absence of default writable paths in Python startup logs, and test that startup no longer raises MemoryError when the crafted file is present.

Typical attack path

  1. Locate or create a writable default mime.types path on Windows
  2. Write invalid or attacker-controlled MIME mapping data into the file
  3. Trigger startup of any Python process that imports mimetypes
  4. Observe MemoryError or incorrect file-type interpretation

How to detect it

Review Python process startup logs for MemoryError entries, inspect C:\etc and similar default paths for unexpected mime.types files, and correlate with any recent file-creation events in those directories.

What your security team should do

  • Apply the provided fixed package versions immediately on Debian systems
  • Add mimetypes.init([]) workaround to all Windows Python entry points
  • Monitor EPSS and KEV status for any future increase in exploit activity
  • Audit Python startup code for reliance on default MIME locations

The record

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.

Affected packages

Ecosystem Package Introduced Fixed
Bitnami python 0 3.14.0
Bitnami python-min 0 3.14.0
Chainguard python-3.10 0 0
Chainguard python-3.10-base 0 0
Chainguard python-3.10-base-dev 0 0
Chainguard python-3.10-dev 0 0
Chainguard python-3.10-doc 0 0
Chainguard python-3.11 0 0
Chainguard python-3.11-base 0 0
Chainguard python-3.11-base-dev 0 0
Chainguard python-3.11-dev 0 0
Chainguard python-3.11-doc 0 0
Chainguard python-3.12 0 0
Chainguard python-3.12-base 0 0
Chainguard python-3.12-base-dev 0 0
Chainguard python-3.12-dev 0 0
Chainguard python-3.12-doc 0 0
Chainguard python-3.12-privileged-netbindservice 0 0
Chainguard python-3.12-tk 0 0
Chainguard python-3.13 0 0
Chainguard python-3.13-base 0 0
Chainguard python-3.13-base-dev 0 0
Chainguard python-3.13-dev 0 0
Chainguard python-3.13-doc 0 0
Chainguard python-3.13-privileged-netbindservice 0 0
Chainguard python-3.13-tk 0 0
Chainguard python-3.14 0 3.14.2-r2
Chainguard python-3.14 0 3.14.2-r3
Chainguard python-3.14-base 0 3.14.2-r0
Chainguard python-3.14-base-dev 0 3.14.2-r0
Chainguard python-3.14-dev 0 3.14.2-r0
Chainguard python-3.14-doc 0 3.14.2-r0
Chainguard python-3.14-privileged-netbindservice 0 3.14.2-r0
Chainguard python-3.14-tk 0 3.14.2-r0
Chainguard python-3.14t 0 3.14.2-r0
Chainguard python-3.8 0 0
Chainguard python-3.8-base 0 0
Chainguard python-3.8-base-dev 0 0
Chainguard python-3.8-default 0 0
Chainguard python-3.8-dev 0 0
Chainguard python-3.8-doc 0 0
Chainguard python-3.9 0 0
Chainguard python-3.9-base 0 0
Chainguard python-3.9-base-dev 0 0
Chainguard python-3.9-default 0 0
Chainguard python-3.9-dev 0 0
Chainguard python-3.9-doc 0 0
Ubuntu:20.04:LTS python2.7 0 No fix
Ubuntu:20.04:LTS python3.8 0 No fix
Ubuntu:20.04:LTS python3.9 0 No fix
Ubuntu:22.04:LTS python2.7 0 No fix
Ubuntu:22.04:LTS python3.10 0 No fix
Ubuntu:22.04:LTS python3.11 0 No fix
Ubuntu:24.04:LTS python3.12 0 No fix
Ubuntu:24.10 python3.12 0 No fix
Ubuntu:24.10 python3.13 0 No fix
Ubuntu:Pro:14.04:LTS python2.7 0 No fix
Ubuntu:Pro:14.04:LTS python3.4 0 No fix
Ubuntu:Pro:14.04:LTS python3.5 0 No fix
Ubuntu:Pro:16.04:LTS python2.7 0 No fix
Ubuntu:Pro:16.04:LTS python3.5 0 No fix
Ubuntu:Pro:18.04:LTS python2.7 0 No fix
Ubuntu:Pro:18.04:LTS python3.6 0 No fix
Ubuntu:Pro:18.04:LTS python3.7 0 No fix
Ubuntu:Pro:18.04:LTS python3.8 0 No fix
Wolfi python-3.10 0 0
Wolfi python-3.10-base 0 0
Wolfi python-3.10-base-dev 0 0
Wolfi python-3.10-dev 0 0
Wolfi python-3.10-doc 0 0
Wolfi python-3.11 0 0
Wolfi python-3.11-base 0 0
Wolfi python-3.11-base-dev 0 0
Wolfi python-3.11-dev 0 0
Wolfi python-3.11-doc 0 0
Wolfi python-3.12 0 0
Wolfi python-3.12-base 0 0
Wolfi python-3.12-base-dev 0 0
Wolfi python-3.12-dev 0 0
Wolfi python-3.12-doc 0 0
Wolfi python-3.12-privileged-netbindservice 0 0
Wolfi python-3.12-tk 0 0
Wolfi python-3.13 0 0
Wolfi python-3.13-base 0 0
Wolfi python-3.13-base-dev 0 0
Wolfi python-3.13-dev 0 0
Wolfi python-3.13-doc 0 0
Wolfi python-3.13-privileged-netbindservice 0 0
Wolfi python-3.13-tk 0 0
Wolfi python-3.14 0 3.14.2-r2
Wolfi python-3.14 0 3.14.2-r3
Wolfi python-3.14-base 0 3.14.2-r0
Wolfi python-3.14-base-dev 0 3.14.2-r0
Wolfi python-3.14-dev 0 3.14.2-r0
Wolfi python-3.14-doc 0 3.14.2-r0
Wolfi python-3.14-privileged-netbindservice 0 3.14.2-r0
Wolfi python-3.14-tk 0 3.14.2-r0
Wolfi python-3.14t 0 3.14.2-r0

Related vulnerabilities