CVE-2012-3865: Puppet Path Traversal Vulnerability

LOW
Advisory Identifier: GHSA-g89m-3wjw-h857
CWE-22
Published
Advisory Summary

CVE-2012-3865 is a LOW path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Puppet libraries in the RubyGems ecosystem. The issue involves puppet vulnerable to path traversal. Remediation is available by upgrading affected packages to version 2.6.17, 2.7.18.

CVE-2012-3865 at a Glance

CVE Identifier CVE-2012-3865
GHSA Identifier GHSA-g89m-3wjw-h857
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Puppet
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix CVE-2012-3865

To remediate this vulnerability, upgrade all affected Puppet dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

puppet fixed: 2.6.17
Upgrade puppet to 2.6.17
puppet fixed: 2.7.18
Upgrade puppet to 2.7.18
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for puppet

How to Check if You Are Affected

To determine whether your application is affected by CVE-2012-3865, inspect your project dependencies for Puppet:

inspect dependencies for puppet

Analyze the terminal output to locate any version of Puppet in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.6.17), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Puppet, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2012-3865 Affected Puppet Versions

2 component(s)
Fixed Versions:
2.6.172.7.18
Product / Package Ecosystem Affected Versions Fixed Version
puppet
RubyGems
< 2.6.17
2.6.17
puppet
RubyGems
≥ 2.7.0
< 2.7.18
2.7.18

References

Frequently Asked Questions

What is CVE-2012-3865?
CVE-2012-3865 is a security vulnerability in Puppet involving Puppet vulnerable to Path Traversal under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Puppet versions are affected?
Affected versions include releases prior to 2.6.17, 2.7.18 across affected packages: puppet.
What version fixes CVE-2012-3865?
Upgrading to 2.6.17, 2.7.18 (or the latest patched release for your respective branch) resolves the vulnerability.
Is puppet affected?
Yes, puppet is affected in releases prior to 2.6.17, 2.7.18. Upgrade your dependency to 2.6.17, 2.7.18 or later.
What CWE is associated with CVE-2012-3865?
CVE-2012-3865 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check RubyGems dependencies for CVE-2012-3865?
Run the dependency tree command: 'inspect dependencies for puppet'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-g89m-3wjw-h857",
  "modified" : "2023-05-12T17:09:48Z",
  "published" : "2017-10-24T18:33:37Z",
  "aliases" : [ "CVE-2012-3865" ],
  "summary" : "Puppet vulnerable to Path Traversal",
  "details" : "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.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "puppet"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.6.17"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "puppet"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.7.0"
      }, {
        "fixed" : "2.7.18"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2012-3865"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/puppetlabs/puppet/commit/554eefc55f57ed2b76e5ee04d8f194d36f6ee67f"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/puppetlabs/puppet/commit/d80478208d79a3e6d6cb1fbc525e24817fe8c4c6"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=839131"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/puppetlabs/puppet"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/CVE-2012-3865.yml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/puppet/CVE-2012-3865.yml"
  }, {
    "type" : "WEB",
    "url" : "https://www.puppet.com/security/cve/overview-cve-2012-3865-arbitrary-file-delete/dos-puppet-master"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2012-08/msg00006.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-updates/2012-07/msg00036.html"
  }, {
    "type" : "WEB",
    "url" : "http://puppetlabs.com/security/cve/cve-2012-3865"
  }, {
    "type" : "WEB",
    "url" : "http://www.debian.org/security/2012/dsa-2511"
  }, {
    "type" : "WEB",
    "url" : "http://www.ubuntu.com/usn/USN-1506-1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:36:27Z",
    "nvd_published_at" : "2012-08-06T16:55:06Z"
  }
}