# CVE-2024-3220: Default mimetype known files writeable on Windows

> Local attackers can write to default mimetype files on Windows, causing Python startup failures or incorrect file type interpretation.

- **Severity:** Low 2.3 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 14 Feb 2025
- **Updated:** 26 Oct 2026
- **Also known as:** ALPINE-CVE-2024-3220, AZL-84266, BIT-python-2024-3220, BIT-python-min-2024-3220, GHSA-74p9-4v44-wwx5, MINI-2p8q-f6xf-mvgw, MINI-437j-9356-wfw5, MINI-8f6f-67cp-7prc, MINI-f737-g5qm-9555, MINI-p465-vffm-9g9p, PSF-2025-2

## What is CVE-2024-3220?

CVE-2024-3220 is a low-severity path traversal vulnerability in CPython, published on 14 Feb 2025. Any signed-in user can exploit it over the network, with no action from the victim.

### Official 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.

Weakness: CWE-426 (Untrusted Search Path)

## Which versions are affected by CVE-2024-3220?

2 open source packages ship an affected version, including python and python-min.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `python` | Bitnami | All versions | 3.14.0 |
| `python-min` | Bitnami | All versions | 3.14.0 |

## How do I fix CVE-2024-3220?

Upgrade python to 3.14.0 or later.

## Is CVE-2024-3220 being exploited?

There is no known exploitation of CVE-2024-3220 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-3220 and fix it if it is affected.

What it is: CVE-2024-3220 is a low-severity path traversal vulnerability in CPython, published on 14 Feb 2025. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2024-3220 in the wild and no public exploit code.

Affected packages and fixed versions:
- python (Bitnami): affected all versions; fixed in 3.14.0
- python-min (Bitnami): affected all versions; fixed in 3.14.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-3220/ (Markdown: https://insights.sbomify.com/CVE-2024-3220/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-3220
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-3220
- OSV: https://osv.dev/vulnerability/CVE-2024-3220

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-3220/
Summaries are generated and may contain mistakes; the official description above is the record.
