Bug 481565 - (CVE-2009-0316) CVE-2009-0316 vim: untrusted python modules search path
CVE-2009-0316 vim: untrusted python modules search path
Status: CLOSED WONTFIX
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
low Severity low
: ---
: ---
Assigned To: Red Hat Product Security
http://www.nabble.com/Bug-484305%3A-b...
public=20080806,reported=20081112,sou...
: Security
Depends On: CVE-2008-5983
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-26 07:45 EST by Jan Lieskovsky
Modified: 2015-03-02 14:18 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-03-02 14:17:21 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Jan Lieskovsky 2009-01-26 07:45:30 EST
Untrusted search path vulnerability in the of Vim allows local
users to execute arbitrary code via a Trojan horse Python file in the
current working directory, related to an erroneous setting of sys.path
by the PySys_SetArgv function.

References (test case, PoC):
http://www.nabble.com/Bug-484305%3A-bicyclerepair%3A-bike.vim-imports-untrusted-python-files-from-cwd-td18848099.html

Proposed patch:
The Debian patch for similar dia's Python related issue,
available at:

http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=pythonpath.diff;att=1;bug=504251

should be sufficient to resolve this issue.
Comment 1 Jan Lieskovsky 2009-01-26 07:47:15 EST
This issue does NOT affect the version of the Vim package, as shipped
with Red Hat Enterprise Linux 2.1.

This issue affects the versions of the Vim package, as shipped 
with Red Hat Enterprise Linux 3, 4, and 5. 

Comment relevant to fixes for RHEL-{3,4,5}:

The Red Hat Security Response Team has rated this issue as having low security
impact, a future update may address this flaw.  More information regarding
issue severity can be found here:
http://www.redhat.com/security/updates/classification/
Comment 2 Jan Lieskovsky 2009-01-26 07:48:52 EST
This issue affects the versions of the Vim package, as shipped 
with Fedora releases of 9, 10 and devel.

Please fix.
Comment 3 Karsten Hopp 2009-01-26 11:24:51 EST
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=493937

This has been fixed upstream with patch 7.2.045
Fedora releases 9, 10 and devel are at least at patchlevel 60 and are not vulnerable.
Comment 4 Jan Lieskovsky 2009-01-28 05:58:38 EST
Common Vulnerabilities and Exposures assigned an identifier CVE-2009-0316 to
this vulnerability:

Untrusted search path vulnerability in the Python module in vim allows
local users to execute arbitrary code via a Trojan horse Python file
in the current working directory, related to a vulnerability in the
PySys_SetArgv function (CVE-2008-5983).

References:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0316
http://www.nabble.com/Bug-484305%3A-bicyclerepair%3A-bike.vim-imports-untrusted-python-files-from-cwd-td18848099.html
http://www.openwall.com/lists/oss-security/2009/01/26/2
Comment 5 Petr Šplíchal 2009-04-27 09:50:19 EDT
I guess this issue does not affect RHEL-{3,4} as the vim package
is compiled without python support on these.

# vim --version
VIM - Vi IMproved 6.3 (2004 June 7, compiled Nov 17 2008 08:14:13)
...
+path_extra +perl +postscript +printer -python +quickfix +rightleft -ruby
Comment 6 Tomas Hoger 2009-07-13 08:11:28 EDT
(In reply to comment #3)
> This has been fixed upstream with patch 7.2.045

Upstream fix:
http://vim.svn.sourceforge.net/viewvc/vim/vim7/src/if_python.c?r1=1124&r2=1257
ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.045
Comment 7 Josh Bressers 2010-05-19 16:46:26 EDT
Statement:

This issue did not affect vim as shipped in Red Hat Enterprise Linux 3 and 4. This issue is not planned to be fixed in vim packages in Red Hat Enterprise Linux 5.

Note You need to log in before you can comment on or make changes to this bug.