Vulnerabilities > CVE-2007-4829 - Path Traversal vulnerability in multiple products

047910
CVSS 6.8 - MEDIUM
Attack vector
NETWORK
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
PARTIAL
Availability impact
PARTIAL

Summary

Directory traversal vulnerability in the Archive::Tar Perl module 1.36 and earlier allows user-assisted remote attackers to overwrite arbitrary files via a TAR archive that contains a file whose name is an absolute path or has ".." sequences.

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Relative Path Traversal
    An attacker exploits a weakness in input validation on the target by supplying a specially constructed path utilizing dot and slash characters for the purpose of obtaining access to arbitrary files or resources. An attacker modifies a known path on the target in order to reach material that is not available through intended channels. These attacks normally involve adding additional path separators (/ or \) and/or dots (.), or encodings thereof, in various combinations in order to reach parent directories or entirely separate trees of the target's directory structure.
  • Directory Traversal
    An attacker with access to file system resources, either directly or via application logic, will use various file path specification or navigation mechanisms such as ".." in path strings and absolute paths to extend their range of access to inappropriate areas of the file system. The attacker attempts to either explore the file system for recon purposes or access directories and files that are intended to be restricted from their access. Exploring the file system can be achieved through constructing paths presented to directory listing programs, such as "ls" and 'dir', or through specially crafted programs that attempt to explore the file system. The attacker engaging in this type of activity is searching for information that can be used later in a more exploitive attack. Access to restricted directories or files can be achieved through modification of path references utilized by system applications.
  • File System Function Injection, Content Based
    An attack of this type exploits the host's trust in executing remote content including binary files. The files are poisoned with a malicious payload (targeting the file systems accessible by the target software) by the attacker and may be passed through standard channels such as via email, and standard web content like PDF and multimedia files. The attacker exploits known vulnerabilities or handling routines in the target processes. Vulnerabilities of this type have been found in a wide variety of commercial applications from Microsoft Office to Adobe Acrobat and Apple Safari web browser. When the attacker knows the standard handling routines and can identify vulnerabilities and entry points they can be exploited by otherwise seemingly normal content. Once the attack is executed, the attackers' program can access relative directories such as C:\Program Files or other standard system directories to launch further attacks. In a worst case scenario, these programs are combined with other propagation logic and work as a virus.
  • Using Slashes and URL Encoding Combined to Bypass Validation Logic
    This attack targets the encoding of the URL combined with the encoding of the slash characters. An attacker can take advantage of the multiple way of encoding an URL and abuse the interpretation of the URL. An URL may contain special character that need special syntax handling in order to be interpreted. Special characters are represented using a percentage character followed by two digits representing the octet code of the original character (%HEX-CODE). For instance US-ASCII space character would be represented with %20. This is often referred as escaped ending or percent-encoding. Since the server decodes the URL from the requests, it may restrict the access to some URL paths by validating and filtering out the URL requests it received. An attacker will try to craft an URL with a sequence of special characters which once interpreted by the server will be equivalent to a forbidden URL. It can be difficult to protect against this attack since the URL can contain other format of encoding such as UTF-8 encoding, Unicode-encoding, etc.
  • Manipulating Input to File System Calls
    An attacker manipulates inputs to the target software which the target software passes to file system calls in the OS. The goal is to gain access to, and perhaps modify, areas of the file system that the target software did not intend to be accessible.

Nessus

  • NASL familyCentOS Local Security Checks
    NASL idCENTOS_RHSA-2010-0505.NASL
    descriptionAn updated perl-Archive-Tar package that fixes multiple security issues is now available for Red Hat Enterprise Linux 4 and 5. The Red Hat Security Response Team has rated this update as having moderate security impact. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available from the CVE link in the References section. The Archive::Tar module provides a mechanism for Perl scripts to manipulate tar archive files. Multiple directory traversal flaws were discovered in the Archive::Tar module. A specially crafted tar file could cause a Perl script, using the Archive::Tar module to extract the archive, to overwrite an arbitrary file writable by the user running the script. (CVE-2007-4829) This package upgrades the Archive::Tar module to version 1.39_01. Refer to the Archive::Tar module
    last seen2020-06-01
    modified2020-06-02
    plugin id47703
    published2010-07-13
    reporterThis script is Copyright (C) 2010-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/47703
    titleCentOS 4 / 5 : perl-Archive-Tar (CESA-2010:0505)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Red Hat Security Advisory RHSA-2010:0505 and 
    # CentOS Errata and Security Advisory 2010:0505 respectively.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(47703);
      script_version("1.16");
      script_cvs_date("Date: 2019/10/25 13:36:05");
    
      script_cve_id("CVE-2007-4829");
      script_bugtraq_id(26355);
      script_xref(name:"RHSA", value:"2010:0505");
    
      script_name(english:"CentOS 4 / 5 : perl-Archive-Tar (CESA-2010:0505)");
      script_summary(english:"Checks rpm output for the updated package");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote CentOS host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "An updated perl-Archive-Tar package that fixes multiple security
    issues is now available for Red Hat Enterprise Linux 4 and 5.
    
    The Red Hat Security Response Team has rated this update as having
    moderate security impact. A Common Vulnerability Scoring System (CVSS)
    base score, which gives a detailed severity rating, is available from
    the CVE link in the References section.
    
    The Archive::Tar module provides a mechanism for Perl scripts to
    manipulate tar archive files.
    
    Multiple directory traversal flaws were discovered in the Archive::Tar
    module. A specially crafted tar file could cause a Perl script, using
    the Archive::Tar module to extract the archive, to overwrite an
    arbitrary file writable by the user running the script.
    (CVE-2007-4829)
    
    This package upgrades the Archive::Tar module to version 1.39_01.
    Refer to the Archive::Tar module's changes file, linked to in the
    References, for a full list of changes.
    
    Users of perl-Archive-Tar are advised to upgrade to this updated
    package, which corrects these issues. All applications using the
    Archive::Tar module must be restarted for this update to take effect."
      );
      # https://lists.centos.org/pipermail/centos-announce/2010-July/016749.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?74b4d107"
      );
      # https://lists.centos.org/pipermail/centos-announce/2010-July/016750.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?6890cf7e"
      );
      # https://lists.centos.org/pipermail/centos-announce/2010-July/016813.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?1f1b09e7"
      );
      # https://lists.centos.org/pipermail/centos-announce/2010-July/016814.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?80125ec9"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected perl-archive-tar package."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"false");
      script_cwe_id(22);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:perl-Archive-Tar");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:centos:centos:4");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:centos:centos:5");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2007/11/02");
      script_set_attribute(attribute:"patch_publication_date", value:"2010/07/21");
      script_set_attribute(attribute:"plugin_publication_date", value:"2010/07/13");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2010-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"CentOS Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/CentOS/release", "Host/CentOS/rpm-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("rpm.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/CentOS/release");
    if (isnull(release) || "CentOS" >!< release) audit(AUDIT_OS_NOT, "CentOS");
    os_ver = pregmatch(pattern: "CentOS(?: Linux)? release ([0-9]+)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "CentOS");
    os_ver = os_ver[1];
    if (! preg(pattern:"^(4|5)([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "CentOS 4.x / 5.x", "CentOS " + os_ver);
    
    if (!get_kb_item("Host/CentOS/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && "ia64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "CentOS", cpu);
    
    
    flag = 0;
    if (rpm_check(release:"CentOS-4", cpu:"i386", reference:"perl-Archive-Tar-1.39.1-1.el4_8.1")) flag++;
    if (rpm_check(release:"CentOS-4", cpu:"x86_64", reference:"perl-Archive-Tar-1.39.1-1.el4_8.1")) flag++;
    
    if (rpm_check(release:"CentOS-5", reference:"perl-Archive-Tar-1.39.1-1.el5_5.1")) flag++;
    
    
    if (flag)
    {
      security_report_v4(
        port       : 0,
        severity   : SECURITY_WARNING,
        extra      : rpm_report_get()
      );
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "perl-Archive-Tar");
    }
    
  • NASL familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-700-1.NASL
    descriptionJonathan Smith discovered that the Archive::Tar Perl module did not correctly handle symlinks when extracting archives. If a user or automated system were tricked into opening a specially crafted tar file, a remote attacker could over-write arbitrary files. (CVE-2007-4829) Tavis Ormandy and Will Drewry discovered that Perl did not correctly handle certain utf8 characters in regular expressions. If a user or automated system were tricked into using a specially crafted expression, a remote attacker could crash the application, leading to a denial of service. Ubuntu 8.10 was not affected by this issue. (CVE-2008-1927) A race condition was discovered in the File::Path Perl module
    last seen2020-06-01
    modified2020-06-02
    plugin id37888
    published2009-04-23
    reporterUbuntu Security Notice (C) 2008-2019 Canonical, Inc. / NASL script (C) 2009-2018 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/37888
    titleUbuntu 6.06 LTS / 7.10 / 8.04 LTS / 8.10 : libarchive-tar-perl, perl vulnerabilities (USN-700-1)
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2008-11736.NASL
    descriptionCVE-2007-4829 perl-Archive-Tar directory traversal flaws. Update of Pod::Simple with better html support. Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-01
    modified2020-06-02
    plugin id36266
    published2009-04-23
    reporterThis script is Copyright (C) 2009-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/36266
    titleFedora 10 : perl-5.10.0-52.fc10 (2008-11736)
  • NASL familyScientific Linux Local Security Checks
    NASL idSL_20100701_PERL_ARCHIVE_TAR_ON_SL4_X.NASL
    descriptionMultiple directory traversal flaws were discovered in the Archive::Tar module. A specially crafted tar file could cause a Perl script, using the Archive::Tar module to extract the archive, to overwrite an arbitrary file writable by the user running the script. (CVE-2007-4829) This package upgrades the Archive::Tar module to version 1.39_01. All applications using the Archive::Tar module must be restarted for this update to take effect. Note: SL 40-45 needed perl-IO-Zlib
    last seen2020-06-01
    modified2020-06-02
    plugin id60811
    published2012-08-01
    reporterThis script is Copyright (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/60811
    titleScientific Linux Security Update : perl-Archive-Tar on SL4.x, SL5.x i386/x86_64
  • NASL familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-700-2.NASL
    descriptionUSN-700-1 fixed vulnerabilities in Perl. Due to problems with the Ubuntu 8.04 build, some Perl .ph files were missing from the resulting update. This update fixes the problem. We apologize for the inconvenience. Jonathan Smith discovered that the Archive::Tar Perl module did not correctly handle symlinks when extracting archives. If a user or automated system were tricked into opening a specially crafted tar file, a remote attacker could over-write arbitrary files. (CVE-2007-4829) Tavis Ormandy and Will Drewry discovered that Perl did not correctly handle certain utf8 characters in regular expressions. If a user or automated system were tricked into using a specially crafted expression, a remote attacker could crash the application, leading to a denial of service. Ubuntu 8.10 was not affected by this issue. (CVE-2008-1927) A race condition was discovered in the File::Path Perl module
    last seen2020-06-01
    modified2020-06-02
    plugin id37746
    published2009-04-23
    reporterUbuntu Security Notice (C) 2009-2019 Canonical, Inc. / NASL script (C) 2009-2018 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/37746
    titleUbuntu 8.04 LTS : perl regression (USN-700-2)
  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-200812-10.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-200812-10 (Archive::Tar: Directory traversal vulnerability) Jonathan Smith of rPath reported that Archive::Tar does not check for
    last seen2020-06-01
    modified2020-06-02
    plugin id35085
    published2008-12-11
    reporterThis script is Copyright (C) 2008-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/35085
    titleGLSA-200812-10 : Archive::Tar: Directory traversal vulnerability
  • NASL familyRed Hat Local Security Checks
    NASL idREDHAT-RHSA-2010-0505.NASL
    descriptionAn updated perl-Archive-Tar package that fixes multiple security issues is now available for Red Hat Enterprise Linux 4 and 5. The Red Hat Security Response Team has rated this update as having moderate security impact. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available from the CVE link in the References section. The Archive::Tar module provides a mechanism for Perl scripts to manipulate tar archive files. Multiple directory traversal flaws were discovered in the Archive::Tar module. A specially crafted tar file could cause a Perl script, using the Archive::Tar module to extract the archive, to overwrite an arbitrary file writable by the user running the script. (CVE-2007-4829) This package upgrades the Archive::Tar module to version 1.39_01. Refer to the Archive::Tar module
    last seen2020-06-01
    modified2020-06-02
    plugin id47871
    published2010-07-28
    reporterThis script is Copyright (C) 2010-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/47871
    titleRHEL 4 / 5 : perl-Archive-Tar (RHSA-2010:0505)
  • NASL familyOracle Linux Local Security Checks
    NASL idORACLELINUX_ELSA-2010-0505.NASL
    descriptionFrom Red Hat Security Advisory 2010:0505 : An updated perl-Archive-Tar package that fixes multiple security issues is now available for Red Hat Enterprise Linux 4 and 5. The Red Hat Security Response Team has rated this update as having moderate security impact. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available from the CVE link in the References section. The Archive::Tar module provides a mechanism for Perl scripts to manipulate tar archive files. Multiple directory traversal flaws were discovered in the Archive::Tar module. A specially crafted tar file could cause a Perl script, using the Archive::Tar module to extract the archive, to overwrite an arbitrary file writable by the user running the script. (CVE-2007-4829) This package upgrades the Archive::Tar module to version 1.39_01. Refer to the Archive::Tar module
    last seen2020-06-01
    modified2020-06-02
    plugin id68057
    published2013-07-12
    reporterThis script is Copyright (C) 2013-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/68057
    titleOracle Linux 4 / 5 : perl-Archive-Tar (ELSA-2010-0505)

Oval

accepted2013-04-29T04:15:13.812-04:00
classvulnerability
contributors
  • nameAharon Chernin
    organizationSCAP.com, LLC
  • nameDragos Prisaca
    organizationG2, Inc.
definition_extensions
  • commentThe operating system installed on the system is Red Hat Enterprise Linux 4
    ovaloval:org.mitre.oval:def:11831
  • commentCentOS Linux 4.x
    ovaloval:org.mitre.oval:def:16636
  • commentOracle Linux 4.x
    ovaloval:org.mitre.oval:def:15990
  • commentThe operating system installed on the system is Red Hat Enterprise Linux 5
    ovaloval:org.mitre.oval:def:11414
  • commentThe operating system installed on the system is CentOS Linux 5.x
    ovaloval:org.mitre.oval:def:15802
  • commentOracle Linux 5.x
    ovaloval:org.mitre.oval:def:15459
descriptionDirectory traversal vulnerability in the Archive::Tar Perl module 1.36 and earlier allows user-assisted remote attackers to overwrite arbitrary files via a TAR archive that contains a file whose name is an absolute path or has ".." sequences.
familyunix
idoval:org.mitre.oval:def:11658
statusaccepted
submitted2010-07-09T03:56:16-04:00
titleDirectory traversal vulnerability in the Archive::Tar Perl module 1.36 and earlier allows user-assisted remote attackers to overwrite arbitrary files via a TAR archive that contains a file whose name is an absolute path or has ".." sequences.
version27

Redhat

advisories
bugzilla
id295021
titleCVE-2007-4829 perl-Archive-Tar directory traversal flaws
oval
OR
  • commentRed Hat Enterprise Linux must be installed
    ovaloval:com.redhat.rhba:tst:20070304026
  • AND
    • commentRed Hat Enterprise Linux 4 is installed
      ovaloval:com.redhat.rhba:tst:20070304025
    • commentperl-Archive-Tar is earlier than 0:1.39.1-1.el4_8.1
      ovaloval:com.redhat.rhsa:tst:20100505001
    • commentperl-Archive-Tar is signed with Red Hat master key
      ovaloval:com.redhat.rhsa:tst:20100505002
  • AND
    • commentRed Hat Enterprise Linux 5 is installed
      ovaloval:com.redhat.rhba:tst:20070331005
    • commentperl-Archive-Tar is earlier than 1:1.39.1-1.el5_5.1
      ovaloval:com.redhat.rhsa:tst:20100505004
    • commentperl-Archive-Tar is signed with Red Hat redhatrelease key
      ovaloval:com.redhat.rhsa:tst:20100505005
rhsa
idRHSA-2010:0505
released2010-07-01
severityModerate
titleRHSA-2010:0505: perl-Archive-Tar security update (Moderate)
rpms
  • perl-Archive-Tar-0:1.39.1-1.el4_8.1
  • perl-Archive-Tar-1:1.39.1-1.el5_5.1

Seebug

bulletinFamilyexploit
descriptionBUGTRAQ ID: 26355 CVE(CAN) ID: CVE-2007-4829 Archive::Tar是Perl中用于操控tar文档的模块。 Archive::Tar模块在解压tar文档时存在输入验证错误,如果所解压到文档中包含有目录遍历序列的话,就可以将文件解压到指定目录以外的任意位置。 CPAN Archive::Tar 1.36 目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本: <a href="http://www.cpan.org" target="_blank">http://www.cpan.org</a>
idSSV:2398
last seen2017-11-19
modified2007-11-08
published2007-11-08
reporterRoot
titlePerl Archive::Tar模块远程目录遍历漏洞