BIT-python-2022-26488: Python Software Foundation Python (CPython) vulnerability

Published Mar 7, 2022
·
Updated

In Python before 3.10.3 on Windows, local users can gain privileges because the search path is inadequately secured. The installer may allow a local attacker to add user-writable directories to the system search path. To exploit, an administrator must have installed Python for all users and enabled PATH entries. A non-administrative user can trigger a repair that incorrectly adds user-writable paths into PATH, enabling search-path hijacking of other users and system services. This affects Python (CPython) through 3.7.12, 3.8.x through 3.8.12, 3.9.x through 3.9.10, and 3.10.x through 3.10.2.

Affected Software

1 affected component
Python Software Foundation Python (CPython)>=3.7.0<=3.7.12, >=3.8.0<=3.8.12, >=3.9.0<=3.9.10, >=3.10.0<=3.10.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Python (CPython) to a version that resolves this vulnerability.

    Fixed in 3.10.3

Event History

Mar 7, 2022
CVE Published
via OSV·05:26 PM
Data Sourced
via OSV·05:26 PM
Description

Frequently Asked Questions

1

Which installations are exposed to this issue?

The issue affects Windows installations where an administrator installed CPython for all users and enabled PATH entries. It affects CPython through 3.7.12, 3.8.x through 3.8.12, 3.9.x through 3.9.10, and 3.10.x through 3.10.2.

2

What does an attacker need to exploit it?

The attacker needs local access as a non-administrative user. They can trigger a repair that adds user-writable directories to PATH, then use search-path hijacking to affect other users or system services.

3

How can I determine whether a system may already be affected?

Review Windows PATH entries for user-writable directories, particularly after a non-administrative user has run a Python repair. Also verify whether Python was installed for all users with PATH entries enabled.

4

What configuration change can reduce exposure if patching is not immediately possible?

Avoid allowing user-writable directories in the system search path and review PATH entries added by Python installation or repair actions. Restricting the conditions that permit a non-administrative user to trigger the affected repair behavior reduces exposure.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203