Vulnerabilities > CVE-2012-3865 - Path Traversal vulnerability in multiple products

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

Summary

Directory traversal vulnerability in lib/puppet/reports/store.rb in Puppet before 2.6.17 and 2.7.x before 2.7.18, and Puppet Enterprise before 2.5.2, when Delete is enabled in auth.conf, allows remote authenticated users to delete arbitrary files on the puppet master server via a .. (dot dot) in a node name.

Vulnerable Configurations

Part Description Count
Application
Puppet
45
Application
Puppetlabs
52

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 familyFedora Local Security Checks
    NASL idFEDORA_2012-10897.NASL
    descriptionThis is an upstream security release. It addresses a number of issues found in puppet-2.6.x. The Red Hat security team has rated this update as having low security impact. Refer to the upstream release notes and bugzilla entries for further details. http://projects.puppetlabs.com/projects/1/wiki/Release_Notes#2.6.17 NetworkManager compatibility should be improved in this release, thanks to Orion Poplawski (any bugs in implementing Orion
    last seen2020-03-17
    modified2012-07-30
    plugin id60146
    published2012-07-30
    reporterThis script is Copyright (C) 2012-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/60146
    titleFedora 16 : puppet-2.6.17-2.fc16 (2012-10897)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Fedora Security Advisory 2012-10897.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(60146);
      script_version("1.10");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/03/12");
    
      script_cve_id("CVE-2012-3864", "CVE-2012-3865", "CVE-2012-3867");
      script_bugtraq_id(54399);
      script_xref(name:"FEDORA", value:"2012-10897");
    
      script_name(english:"Fedora 16 : puppet-2.6.17-2.fc16 (2012-10897)");
      script_summary(english:"Checks rpm output for the updated package.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Fedora host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "This is an upstream security release. It addresses a number of issues
    found in puppet-2.6.x. The Red Hat security team has rated this update
    as having low security impact.
    
    Refer to the upstream release notes and bugzilla entries for further
    details.
    
    http://projects.puppetlabs.com/projects/1/wiki/Release_Notes#2.6.17
    
    NetworkManager compatibility should be improved in this release,
    thanks to Orion Poplawski (any bugs in implementing Orion's suggested
    dispatcher script are my own).
    
    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."
      );
      # http://projects.puppetlabs.com/projects/1/wiki/Release_Notes#2.6.17
      script_set_attribute(
        attribute:"see_also",
        value:"https://puppet.com/docs/puppet/6.0/release_notes_puppet.html#2.6.17"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.redhat.com/show_bug.cgi?id=839130"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.redhat.com/show_bug.cgi?id=839131"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.redhat.com/show_bug.cgi?id=839158"
      );
      # https://lists.fedoraproject.org/pipermail/package-announce/2012-July/084309.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?f8b1a925"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected puppet package."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:N/I:P/A:N");
      script_set_cvss_temporal_vector("CVSS2#E:ND/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_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:puppet");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:16");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2012/07/20");
      script_set_attribute(attribute:"plugin_publication_date", value:"2012/07/30");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2012-2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Fedora Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/RedHat/release", "Host/RedHat/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/RedHat/release");
    if (isnull(release) || "Fedora" >!< release) audit(AUDIT_OS_NOT, "Fedora");
    os_ver = eregmatch(pattern: "Fedora.*release ([0-9]+)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Fedora");
    os_ver = os_ver[1];
    if (! ereg(pattern:"^16([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Fedora 16.x", "Fedora " + os_ver);
    
    if (!get_kb_item("Host/RedHat/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Fedora", cpu);
    
    flag = 0;
    if (rpm_check(release:"FC16", reference:"puppet-2.6.17-2.fc16")) flag++;
    
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get());
      else security_warning(0);
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "puppet");
    }
    
  • NASL familyAmazon Linux Local Security Checks
    NASL idALA_ALAS-2012-135.NASL
    descriptionDirectory traversal vulnerability in lib/puppet/reports/store.rb in Puppet before 2.6.17 and 2.7.x before 2.7.18, and Puppet Enterprise before 2.5.2, when Delete is enabled in auth.conf, allows remote authenticated users to delete arbitrary files on the puppet master server via a .. (dot dot) in a node name. Puppet before 2.6.17 and 2.7.x before 2.7.18, and Puppet Enterprise before 2.5.2, allows remote authenticated users to read arbitrary files on the puppet master server by leveraging an arbitrary user
    last seen2020-06-01
    modified2020-06-02
    plugin id69625
    published2013-09-04
    reporterThis script is Copyright (C) 2013-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/69625
    titleAmazon Linux AMI : puppet (ALAS-2012-135)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Amazon Linux AMI Security Advisory ALAS-2012-135.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(69625);
      script_version("1.5");
      script_cvs_date("Date: 2018/04/18 15:09:34");
    
      script_cve_id("CVE-2012-3864", "CVE-2012-3865", "CVE-2012-3866", "CVE-2012-3867");
      script_xref(name:"ALAS", value:"2012-135");
    
      script_name(english:"Amazon Linux AMI : puppet (ALAS-2012-135)");
      script_summary(english:"Checks rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Amazon Linux AMI host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Directory traversal vulnerability in lib/puppet/reports/store.rb in
    Puppet before 2.6.17 and 2.7.x before 2.7.18, and Puppet Enterprise
    before 2.5.2, when Delete is enabled in auth.conf, allows remote
    authenticated users to delete arbitrary files on the puppet master
    server via a .. (dot dot) in a node name.
    
    Puppet before 2.6.17 and 2.7.x before 2.7.18, and Puppet Enterprise
    before 2.5.2, allows remote authenticated users to read arbitrary
    files on the puppet master server by leveraging an arbitrary user's
    certificate and private key in a GET request.
    
    lib/puppet/ssl/certificate_authority.rb in Puppet before 2.6.17 and
    2.7.x before 2.7.18, and Puppet Enterprise before 2.5.2, does not
    properly restrict the characters in the Common Name field of a
    Certificate Signing Request (CSR), which makes it easier for
    user-assisted remote attackers to trick administrators into signing a
    crafted agent certificate via ANSI control sequences.
    
    lib/puppet/defaults.rb in Puppet 2.7.x before 2.7.18, and Puppet
    Enterprise before 2.5.2, uses 0644 permissions for
    last_run_report.yaml, which allows local users to obtain sensitive
    configuration information by leveraging access to the puppet master
    server to read this file."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://alas.aws.amazon.com/ALAS-2012-135.html"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Run 'yum update puppet' to update your system."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:N/I:P/A:N");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:puppet");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:puppet-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:puppet-server");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:amazon:linux");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2012/10/15");
      script_set_attribute(attribute:"plugin_publication_date", value:"2013/09/04");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2013-2018 Tenable Network Security, Inc.");
      script_family(english:"Amazon Linux Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/AmazonLinux/release", "Host/AmazonLinux/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/AmazonLinux/release");
    if (isnull(release) || !strlen(release)) audit(AUDIT_OS_NOT, "Amazon Linux");
    os_ver = pregmatch(pattern: "^AL(A|\d)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Amazon Linux");
    os_ver = os_ver[1];
    if (os_ver != "A")
    {
      if (os_ver == 'A') os_ver = 'AMI';
      audit(AUDIT_OS_NOT, "Amazon Linux AMI", "Amazon Linux " + os_ver);
    }
    
    if (!get_kb_item("Host/AmazonLinux/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    if (rpm_check(release:"ALA", reference:"puppet-2.7.18-1.9.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"puppet-debuginfo-2.7.18-1.9.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"puppet-server-2.7.18-1.9.amzn1")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get());
      else security_warning(0);
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "puppet / puppet-debuginfo / puppet-server");
    }
    
  • NASL familySuSE Local Security Checks
    NASL idSUSE_11_PUPPET-120716.NASL
    descriptionThe following bugs have been fixed in puppet : - puppet: authenticated clients can read arbitrary files via a flaw in puppet master. (bnc#770828, CVE-2012-3864) - puppet: arbitrary file delete / Denial of Service on Puppet Master by authenticated clients. (bnc#770829, CVE-2012-3865) - puppet: insufficient input validation for agent certificate names. (bnc#770833, CVE-2012-3867)
    last seen2020-06-05
    modified2013-01-25
    plugin id64218
    published2013-01-25
    reporterThis script is Copyright (C) 2013-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/64218
    titleSuSE 11.1 Security Update : puppet (SAT Patch Number 6561)
  • NASL familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-1506-1.NASL
    descriptionIt was discovered that Puppet incorrectly handled certain HTTP GET requests. An attacker could use this flaw with a valid client certificate to retrieve arbitrary files from the Puppet master. (CVE-2012-3864) It was discovered that Puppet incorrectly handled Delete requests. If a Puppet master were reconfigured to allow the
    last seen2020-06-01
    modified2020-06-02
    plugin id59965
    published2012-07-13
    reporterUbuntu Security Notice (C) 2012-2019 Canonical, Inc. / NASL script (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/59965
    titleUbuntu 10.04 LTS / 11.04 / 11.10 / 12.04 LTS : puppet vulnerabilities (USN-1506-1)
  • NASL familyFreeBSD Local Security Checks
    NASL idFREEBSD_PKG_3A6960EFC8A811E19924001FD0AF1A4C.NASL
    descriptionpuppet -- multiple vulnerabilities Arbitrary file read on the puppet master from authenticated clients (high). It is possible to construct an HTTP get request from an authenticated client with a valid certificate that will return the contents of an arbitrary file on the Puppet master that the master has read-access to. Arbitrary file delete/D.O.S on Puppet Master from authenticated clients (high). Given a Puppet master with the
    last seen2020-06-01
    modified2020-06-02
    plugin id59945
    published2012-07-11
    reporterThis script is Copyright (C) 2012-2018 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/59945
    titleFreeBSD : puppet -- multiple vulnerabilities (3a6960ef-c8a8-11e1-9924-001fd0af1a4c)
  • NASL familyFreeBSD Local Security Checks
    NASL idFREEBSD_PKG_101F0AAE52D111E287FEF4CE46B9ACE8.NASL
    descriptionpuppet -- multiple vulnerabilities Arbitrary file read on the puppet master from authenticated clients (high). It is possible to construct an HTTP get request from an authenticated client with a valid certificate that will return the contents of an arbitrary file on the Puppet master that the master has read-access to. Arbitrary file delete/D.O.S on Puppet Master from authenticated clients (high). Given a Puppet master with the
    last seen2020-06-01
    modified2020-06-02
    plugin id63368
    published2013-01-02
    reporterThis script is Copyright (C) 2013-2018 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/63368
    titleFreeBSD : puppet -- multiple vulnerabilities (101f0aae-52d1-11e2-87fe-f4ce46b9ace8)
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-2511.NASL
    descriptionSeveral security vulnerabilities have been found in Puppet, a centralized configuration management : - CVE-2012-3864 Authenticated clients could read arbitrary files on the puppet master. - CVE-2012-3865 Authenticated clients could delete arbitrary files on the puppet master. - CVE-2012-3866 The report of the most recent Puppet run was stored with world readable permissions, resulting in information disclosure. - CVE-2012-3867 Agent hostnames were insufficiently validated.
    last seen2020-03-17
    modified2012-07-18
    plugin id60002
    published2012-07-18
    reporterThis script is Copyright (C) 2012-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/60002
    titleDebian DSA-2511-1 : puppet - several vulnerabilities
  • NASL familySuSE Local Security Checks
    NASL idOPENSUSE-2012-407.NASL
    descriptionpuppet was updated to fix various security issues: CVEs fixed : - bnc#770828 - CVE-2012-3864: puppet: authenticated clients can read arbitrary files via a flaw in puppet master - bnc#770829 - CVE-2012-3865: puppet: arbitrary file delete / Denial of Service on Puppet Master by authenticated clients - bnc#770827 - CVE-2012-3866: puppet: last_run_report.yaml left world-readable - bnc#770833 - CVE-2012-3867: puppet: insufficient input validation for agent certificate names - using the new stable version, 2.6.17, which only receives security fixes. - Removed runlevel 4.
    last seen2020-06-05
    modified2014-06-13
    plugin id74684
    published2014-06-13
    reporterThis script is Copyright (C) 2014-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/74684
    titleopenSUSE Security Update : puppet (openSUSE-SU-2012:0891-1)
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2012-10891.NASL
    descriptionThis is an upstream security release. It addresses a number of issues found in puppet-2.7.x. The Red Hat security team has rated this update as having low security impact. Refer to the upstream release notes and bugzilla entries for further details. http://projects.puppetlabs.com/projects/1/wiki/Release_Notes#2.7.18 NetworkManager compatibility should be improved in this release, thanks to Orion Poplawski (any bugs in implementing Orion
    last seen2020-03-17
    modified2012-07-30
    plugin id60144
    published2012-07-30
    reporterThis script is Copyright (C) 2012-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/60144
    titleFedora 17 : puppet-2.7.18-1.fc17 (2012-10891)

Redhat

rpms
  • converge-ui-devel-0:1.0.4-1.el6cf
  • puppet-0:2.6.17-2.el6cf
  • puppet-server-0:2.6.17-2.el6cf
  • rubygem-actionpack-1:3.0.10-10.el6cf
  • rubygem-activerecord-1:3.0.10-6.el6cf
  • rubygem-activesupport-1:3.0.10-4.el6cf
  • rubygem-chunky_png-0:1.2.0-3.el6cf
  • rubygem-compass-0:0.11.5-2.el6cf
  • rubygem-compass-960-plugin-0:0.10.4-2.el6cf
  • rubygem-compass-960-plugin-doc-0:0.10.4-2.el6cf
  • rubygem-delayed_job-0:2.1.4-2.el6cf
  • rubygem-delayed_job-doc-0:2.1.4-2.el6cf
  • rubygem-ldap_fluff-0:0.1.3-1.el6_3
  • rubygem-mail-0:2.3.0-3.el6cf
  • rubygem-mail-doc-0:2.3.0-3.el6cf
  • rubygem-net-ldap-0:0.1.1-3.el6cf