CVE-2011-4944: Race Condition

Published Nov 30, 2011
·
Updated

It was reported [1] that distutils would create ~/.pypirc insecurely. There is a race from the time the user's username and password is written to the file to when it is chmod'd with appropriate permissions.

Typically, a user's home directory will be created with default 0700 permissions which would not allow for a local attacker to obtain access to this file during the race window, however if a user were to make their home directory 0755 they could be susceptible to this race.

One solution would be to use tempfile.mkstemp() to create the file and then move it in place.

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=650555

Other sources

Python 2.6 through 3.2 creates ~/.pypirc with world-readable permissions before changing them after data has been written, which introduces a race condition that allows local users to obtain a username and password by reading this file.

Launchpad

Affected Software

29 affected componentsFixes available
debian/python2.7
2.7.18-8+deb11u1
Python Python=3.1
Python Python=3.1.1
Python Python=3.0
Python Python=2.6.6
Python Python=3.0.1
Python Python=2.7.1150
Python Python=2.6.1
Python Python=3.1.5
Python Python=2.6.3
Python Python=2.6.2150
Python Python=2.7.1
Python Python=3.1.2150
Python Python=3.1.2
Python Python=2.7.1150
Python Python=2.6.8
Python Python=2.6.7
Python Python=2.7.3
Python Python=2.7.1-rc1
Python Python=2.6.4
Python Python=2.7.2-rc1
Python Python=2.6.6150
Python Python=3.2
Python Python=2.6.2
Python Python=2.7.2150
Python Python=3.2-alpha
Python Python=2.6.5
Python Python=3.1.3
Python Python=3.1.4

Event History

Nov 30, 2011
Data Sourced
via Red Hat·11:09 PM
DescriptionSeverityAffected Software
Aug 27, 2012
CVE Published
via MITRE·11:00 PM
Data Sourced
via MITRE·11:00 PM
Description
Data Sourced
via NVD·11:55 PM
DescriptionSeverityWeaknessAffected Software
Jan 11, 2024
Data Sourced
via Launchpad·09:58 PM
Description
Sep 15, 2024
Data Sourced
via Ubuntu·10:48 PM
RemedyDescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2011-4944?

CVE-2011-4944 is considered a moderate severity vulnerability due to the potential for unauthorized access to sensitive information.

2

How do I fix CVE-2011-4944?

To fix CVE-2011-4944, upgrade to a more secure version of Python that addresses this vulnerability, such as Python 2.7.18 or later.

3

What types of software are affected by CVE-2011-4944?

CVE-2011-4944 affects several versions of Python, including 2.6.x, 2.7.x, and 3.0.x to 3.1.x.

4

What is the nature of the vulnerability in CVE-2011-4944?

CVE-2011-4944 is a race condition vulnerability that allows for insecure handling of user credentials in the ~/.pypirc file.

5

Is there a workaround for CVE-2011-4944?

A temporary workaround for CVE-2011-4944 is to manually manage the permissions of the ~/.pypirc file to ensure it is private until an upgrade can be performed.

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