Untrusted Search Path Affecting python/cpython package, versions [0,]


Severity

Recommended
0.0
low
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Not Defined

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-UNMANAGED-PYTHONCPYTHON-8730852
  • published16 Feb 2025
  • disclosed14 Feb 2025
  • creditUnknown

Introduced: 14 Feb 2025

NewCVE-2024-3220  (opens in a new tab)
CWE-426  (opens in a new tab)

How to fix?

There is no fixed version for python/cpython.

Overview

Affected versions of this package are vulnerable to Untrusted Search Path due to the improper handling of default file locations on Windows platforms. An attacker can create invalid files that cause a MemoryError to be raised on Python runtime startup or have file extensions be interpreted as the incorrect file type by manipulating the writable default file locations. This is only exploitable if the system uses the default file locations without modification.

Workaround

This vulnerability can be mitigated by calling mimetypes.init() with an empty list ([]) on Windows platforms to avoid using the default list of known file locations.

References

CVSS Scores

version 4.0
version 3.1