Skip to content

Don't load from mimetypes.knownfiles by default on Windows #159428

Open

Description

@sethmlarson

Bug report

The default mimetypes.knownfiles are user-writeable on Windows. Instead of loading from these files the default behavior should be to only load from the registry.

See: https://www.cve.org/CVERecord?id=CVE-2024-3220)

On Windows, Currently users are being recommended to call mimetypes.init([]) on Windows to mitigate the vulnerability.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Windows

Linked PRs

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    stdlibStandard Library Python modules in the Lib/ directory
    on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errortype-securityA security issue

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions