Bug 467432 - (CVE-2008-3075) CVE-2008-3075 Vim zip.vim plugin: improper Implementation of shellescape() (arbitrary code execution)
CVE-2008-3075 Vim zip.vim plugin: improper Implementation of shellescape() (a...
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
reported=20080715,public=20080715,sou...
: Security
Depends On: 467451 467452
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-17 09:18 EDT by Jan Lieskovsky
Modified: 2009-06-11 08:59 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-09 03:35:34 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jan Lieskovsky 2008-10-17 09:18:59 EDT
Description of problem:

Jan Minar has reported the following problem present in Vim shellescape()
function implementation and demonstrated by testcases in zip.vim plugin:

The implementation of the shellescape() function does not properly
escape all special items, in particular the '!' character). This
can result in untrusted data being insufficiently sanitized
and possibly lead to arbitrary code execution.

To show this vulnerability can be exploited, the tar.vim plugin test cases
has been updated (zipplugin and zipplugin.v2 test cases).

CVE-2008-3075 as been pre-assigned and used in rPath advisory:

http://www.openwall.com/lists/oss-security/2008/07/10/7 (ZIP-2)

References:

http://www.rdancer.org/vulnerablevim-shellescape.html
http://www.rdancer.org/vulnerablevim.html (ZIP-1)
http://www.openwall.com/lists/oss-security/2008/07/15/2
http://www.openwall.com/lists/oss-security/2008/07/13/1 (ZIP-4)
http://www.openwall.com/lists/oss-security/2008/08/01/1

CVE-2008-2712 bullet (2)

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-2712

mentions zipplugin based on same advisory as ZIP-1. According
to ZIP-2 and ZIP-4 the zip.vim / zipplugin.vim has not been
fixed as of Vim 7.2a.19/zip.vim v19, so the bullet (2) --
mention about zipplugin should be removed from CVE-2008-2712.
Comment 1 Jan Lieskovsky 2008-10-17 09:21:11 EDT
This issue does not affect the versions of the Vim package, as shipped
with Red Hat Enterprise Linux 2.1, 3 and 4. 

This issue affects the versions of the Vim package, as shipped with Red
Hat Enteprise Linux 5 and Fedora releases of 8 and 9 (only Vim 7.0 and
7.1 affected).

This issue does not affect the version of the Vim package as shipped with
Fedora rawhide release (alredy fixed in Vim 7.2).
Comment 5 Red Hat Product Security 2009-01-09 03:35:34 EST
This issue was addressed in:

Red Hat Enterprise Linux:
  http://rhn.redhat.com/errata/RHSA-2008-0580.html

Fedora (updated to upstream 7.2.060): 
  https://admin.fedoraproject.org/updates/F9/FEDORA-2008-10587
  https://admin.fedoraproject.org/updates/F10/FEDORA-2008-10644
Comment 6 Jan Lieskovsky 2009-02-24 05:38:17 EST
Common Vulnerabilities and Exposures assigned an identifier CVE-2008-3075 to
the following vulnerability:

The shellescape function in Vim 7.0 through 7.2, including 7.2a.10,
allows user-assisted attackers to execute arbitrary code via the "!"
(exclamation point) shell metacharacter in (1) the filename of a ZIP
archive and possibly (2) the filename of the first file in a ZIP
archive, which is not properly handled by zip.vim in the VIM ZIP
plugin (zipPlugin.vim) v.11 through v.21, as demonstrated by the
zipplugin and zipplugin.v2 test cases. NOTE: this issue reportedly
exists because of an incomplete fix for CVE-2008-2712. NOTE: this
issue has the same root cause as CVE-2008-3074. NOTE: due to the
complexity of the associated disclosures and the incomplete
information related to them, there may be inaccuracies in this CVE
description and in external mappings to this identifier.

References:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-3075
http://marc.info/?l=bugtraq&m=121494431426308&w=2
http://www.openwall.com/lists/oss-security/2008/07/07/1
http://www.openwall.com/lists/oss-security/2008/07/07/4
http://www.openwall.com/lists/oss-security/2008/07/08/12
http://www.openwall.com/lists/oss-security/2008/07/10/7
http://www.openwall.com/lists/oss-security/2008/07/13/1
http://www.openwall.com/lists/oss-security/2008/07/15/4
http://www.openwall.com/lists/oss-security/2008/08/01/1
http://www.openwall.com/lists/oss-security/2008/10/15/1
http://www.openwall.com/lists/oss-security/2008/10/20/2
http://www.rdancer.org/vulnerablevim.html

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