Skip to content
Heist/ feed
Back to feed
Low

Default mimetype known files writeable on Windows

Type: advisorySources: Official CVE List

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.

Products
CPython
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-3220
Confirmed fixed CVEs
Not specified
Updated in this feed
29 Oct 2026, 07:24 UTC · Revision 2

Source evidence

Default mimetype known files writeable on Windows

core-cve · Original source

Published 14 Feb 2025, 16:18 UTC

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:CVE-2024-3220

CPython

Fixed versions: Not specified

Complete source record
{
  "id": "93ba8733b428466e1c5696af37234596eb94532e849b734a3afa925ec7b129f7",
  "url": "https://www.cve.org/CVERecord?id=CVE-2024-3220",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Default mimetype known files writeable on Windows",
    "summary": "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.",
    "evidence": "cve:CVE-2024-3220",
    "products": [
      {
        "name": {
          "value": "CPython",
          "evidence": "/containers/cna/affected/0/product"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": []
      }
    ],
    "severity": "low",
    "structured": {
      "id": "CVE-2024-3220",
      "aliases": [
        "CVE-2024-3220"
      ],
      "metrics": [
        {
          "format": "CVSS",
          "cvssV4_0": {
            "Safety": "NOT_DEFINED",
            "version": "4.0",
            "Recovery": "NOT_DEFINED",
            "baseScore": 2.3,
            "Automatable": "NOT_DEFINED",
            "attackVector": "NETWORK",
            "baseSeverity": "LOW",
            "valueDensity": "NOT_DEFINED",
            "vectorString": "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",
            "exploitMaturity": "NOT_DEFINED",
            "providerUrgency": "NOT_DEFINED",
            "userInteraction": "NONE",
            "attackComplexity": "LOW",
            "attackRequirements": "PRESENT",
            "privilegesRequired": "LOW",
            "subIntegrityImpact": "NONE",
            "vulnIntegrityImpact": "LOW",
            "subAvailabilityImpact": "NONE",
            "vulnAvailabilityImpact": "LOW",
            "subConfidentialityImpact": "NONE",
            "vulnConfidentialityImpact": "NONE",
            "vulnerabilityResponseEffort": "NOT_DEFINED"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "GENERAL"
            }
          ]
        }
      ],
      "affected": [
        {
          "repo": "https://github.com/python/cpython",
          "vendor": "Python Software Foundation",
          "modules": [
            "mimetypes"
          ],
          "product": "CPython",
          "versions": [
            {
              "status": "affected",
              "version": "0",
              "lessThan": "3.11.18",
              "versionType": "python"
            },
            {
              "status": "affected",
              "version": "3.12.0",
              "lessThan": "3.12.16",
              "versionType": "python"
            },
            {
              "status": "affected",
              "version": "3.13.0",
              "lessThan": "3.13.18",
              "versionType": "python"
            },
            {
              "status": "affected",
              "version": "3.14.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"
        }
      ],
      "modified": "2026-10-26T00:41:57.165Z",
      "provider": "cve",
      "references": [
        "https://mail.python.org/archives/list/security-announce@python.org/thread/CDXW34ND2LSAOYAR5N6UNONP4ZBX4D6R/",
        "https://github.com/python/cpython/issues/159428",
        "https://github.com/python/cpython/commit/04a29bf8f9ff8526cd96cb7368400173303a390a",
        "https://github.com/python/cpython/commit/5550519259656cbb8eeac09e3dbc0d5c248a4dea",
        "https://github.com/python/cpython/commit/76f4555c4ff10f5dda58d6528c17787df41e256c",
        "https://github.com/python/cpython/commit/2f00690fd5a75305e02c99628a41439179266f29",
        "https://github.com/python/cpython/commit/35dd324f6e30735162a68cde84bb04a169004325",
        "https://github.com/python/cpython/commit/8d4286a3f41d36f42c4b4cf5c4451a5a8c23fe87"
      ],
      "provider_metadata": {
        "adp": [
          {
            "title": "CISA ADP Vulnrichment",
            "metrics": [
              {
                "other": {
                  "type": "ssvc",
                  "content": {
                    "id": "CVE-2024-3220",
                    "role": "CISA Coordinator",
                    "options": [
                      {
                        "Exploitation": "none"
                      },
                      {
                        "Automatable": "no"
                      },
                      {
                        "Technical Impact": "partial"
                      }
                    ],
                    "version": "2.0.3",
                    "timestamp": "2025-02-14T16:46:00.511698Z"
                  }
                }
              }
            ],
            "providerMetadata": {
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP",
              "dateUpdated": "2025-02-14T16:46:05.095Z"
            }
          },
          {
            "title": "CVE Program Container",
            "references": [
              {
                "url": "http://www.openwall.com/lists/oss-security/2025/02/14/8"
              },
              {
                "url": "https://security.netapp.com/advisory/ntap-20250314-0001/"
              }
            ],
            "providerMetadata": {
              "orgId": "af854a3a-2127-422b-91ae-364da2661108",
              "shortName": "CVE",
              "dateUpdated": "2025-03-14T10:03:04.669Z"
            }
          }
        ],
        "cna": {
          "orgId": "28c92f92-d60d-412d-b760-e73465c3df22",
          "shortName": "PSF",
          "dateUpdated": "2026-10-26T00:41:57.165Z"
        }
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-3220",
        "evidence": "/cveMetadata/cveId"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/containers/cna/metrics"
  },
  "source_id": "core-cve",
  "document_id": 229502,
  "published_at": "2025-02-14T16:18:00.918+00:00"
}