CVE-2008-5983: Medium severity Python Python vulnerability

Published Aug 6, 2008
·
Updated

Common Vulnerabilities and Exposures assigned an identifier CVE-2008-5983 to the following vulnerability:

Untrusted search path vulnerability in the PySysSetArgv API function in Python before 2.6 prepends an empty string to sys.path when the argv[0] argument does not contain a path separator, which might allow local users to execute arbitrary code via a Trojan horse Python file in the current working directory.

References: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983 http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg586010.html http://www.openwall.com/lists/oss-security/2009/01/26/2 http://www.nabble.com/Bug-484305%3A-bicyclerepair%3A-bike.vim-imports-untrusted-python-files-from-cwd-td18848099.html

Other sources

Untrusted search path vulnerability in the PySysSetArgv API function in Python 2.6 and earlier, and possibly later versions, prepends an empty string to sys.path when the argv[0] argument does not contain a path separator, which might allow local users to execute arbitrary code via a Trojan horse Python file in the current working directory.

Launchpad

Affected Software

11 affected componentsFixes available
redhat/python<0:2.4.3-43.el5
0:2.4.3-43.el5
debian/python2.4
debian/python2.6
debian/python3.1
Python Python<2.6.6
Python Python>=3.1.0<3.1.3
Fedoraproject Fedora=13
Canonical Ubuntu Linux=8.04
Canonical Ubuntu Linux=10.04
Canonical Ubuntu Linux=11.04
Canonical Ubuntu Linux=11.10

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/python to a version that resolves this vulnerability.

    Fixed in 0:2.4.3-43.el5
  2. Compensating control

    Prevent exploitation via a trojan Python file in the current working directory: ensure directories from which Python is executed are not writable by untrusted/local users (restrict filesystem permissions), and avoid running Python with an untrusted current working directory to prevent execution of malicious files placed there.

Event History

Aug 6, 2008
CVE Published
via Red Hat·12:00 AM
Jan 28, 2009
CVE Published
via MITRE·02:00 AM
Data Sourced
via MITRE·02:00 AM
Description
Data Sourced
via NVD·02:30 AM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via Red Hat·11:36 AM
DescriptionSeverityAffected Software
Jan 11, 2024
Data Sourced
via Launchpad·09:58 PM
Description
Sep 15, 2024
Data Sourced
via Ubuntu·10:48 PM
RemedyDescriptionSeverityAffected Software

Parent advisories

This vulnerability appears in the following advisories.

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 CVE-2008-5983?

CVE-2008-5983 is a vulnerability in the PySys_SetArgv API function in Python 2.6 and earlier that allows local users to execute arbitrary code via a Trojan horse P…

2

Which software versions are affected by CVE-2008-5983?

Python 2.6 and earlier, and possibly later versions, are affected by CVE-2008-5983.

3

How severe is CVE-2008-5983?

CVE-2008-5983 has a severity rating of 6.9 (medium).

4

How can I fix CVE-2008-5983?

There are no specific fixes mentioned for CVE-2008-5983. It is recommended to update to the latest version of Python to mitigate the vulnerability.

5

Where can I find more information about CVE-2008-5983?

You can find more information about CVE-2008-5983 at the following references: [link1](http://www.openwall.com/lists/oss-security/2009/01/26/2), [link2](http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg586010.html), [link3](http://www.nabble.com/Bug-484305%3A-bicyclerepair%3A-bike.vim-imports-untrusted-python-files-from-cwd-td18848099.html)

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