Description
Untrusted search path vulnerability in the PySys_SetArgv 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.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 5 | python +4 | 2.4.3-43.el5 | RHSA-2011:0027 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | python-py | No fix yet | — |
Advisories 1
- RHSA-2011:0027 Red Hat Security Advisory: python security, bug fix, and enhancement update Red Hat Security Advisories (RHSA) · Jun 28, 2026
References
- [debian-bugs] 20081112 Bug#493937: [Patch] Prevent loading of Python modules in working directory mailing-list
- https://bugzilla.redhat.com/show_bug.cgi?id=482814
- FEDORA-2010-9652 vendor-advisory
- 51087 third-party-advisory
- [oss-security] 20090130 Re: CVE request -- Python < 2.6 PySys_SetArgv issues (epiphany, csound, dia, eog, gedit, xchat, vim, nautilus-python, Gnumeric) mailing-list
- USN-1616-1 vendor-advisory
- 51040 third-party-advisory
- GLSA-200903-41 vendor-advisory
- [oss-security] 20090126 CVE request -- Python < 2.6 PySys_SetArgv issues (epiphany, csound, dia, eog, gedit, xchat, vim, nautilus-python, Gnumeric) mailing-list
- ADV-2010-1448 vdb-entry
- 50858 third-party-advisory
- [debian-bugs-rc] 20080805 Bug#484305: bicyclerepair: bike.vim imports untrusted python files from cwd mailing-list
- GLSA-200904-06 vendor-advisory
- ADV-2011-0122 vdb-entry
- [oss-security] 20090128 Re: CVE request -- Python < 2.6 PySys_SetArgv issues (epiphany, csound, dia, eog, gedit, xchat, vim, nautilus-python, Gnumeric) mailing-list
- 34522 third-party-advisory
- 42888 third-party-advisory
- USN-1596-1 vendor-advisory
- 40194 third-party-advisory
- RHSA-2011:0027 vendor-advisory
- USN-1613-2 vendor-advisory
- 51024 third-party-advisory
- USN-1613-1 vendor-advisory