Untrusted Search Path Affecting python/cpython package, versions [,3.7.13) [3.8.0,3.8.13) [3.9.0,3.9.11) [3.10.0,3.10.3) [v3.11.0a1,v3.11.0a7)


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    EPSS
    0.04% (6th percentile)

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 ID SNYK-UNMANAGED-PYTHONCPYTHON-8163061
  • published 6 Oct 2024
  • disclosed 4 Oct 2024
  • credit Lockheed Martin Red Team

How to fix?

Upgrade python/cpython to version 3.7.13, 3.8.13, 3.9.11, 3.10.3, v3.11.0a7 or higher.

Overview

Affected versions of this package are vulnerable to Untrusted Search Path in the Windows installer, which allows a local attacker to trigger a repair operation of the "Add Python to PATH" option to add incorrect additional paths to the system PATH variable, and then use search path hijacking to achieve escalation of privilege.

Note: This is only exploitable the "Add Python to PATH" option is selected. Default, per-user installs are also affected, but cannot be used for escalation of privilege. Manually adding the install directory to PATH is not affected.

Workaround

Users who are not able to upgrade to the fixed version can mitigate it by modifying an existing install to disable the "Add Python to PATH" or "Add Python to environment variables" option.

CVSS Scores

version 4.0
version 3.1
Expand this section

Snyk

Recommended
7.3 high
  • Attack Vector (AV)
    Local
  • Attack Complexity (AC)
    Low
  • Attack Requirements (AT)
    Present
  • Privileges Required (PR)
    Low
  • User Interaction (UI)
    None
  • Confidentiality (VC)
    High
  • Integrity (VI)
    High
  • Availability (VA)
    High
  • Confidentiality (SC)
    None
  • Integrity (SI)
    None
  • Availability (SA)
    None