CVE-2012-1988: Puppet Puppet Arbitrary Command Execution Vulnerability

MODERATE
Advisory Identifier: GHSA-6xxq-j39w-g3f6
CWE-78 CWE-77
Published
Advisory Summary

CVE-2012-1988 is a MODERATE puppet arbitrary command execution vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Puppet libraries in the RubyGems ecosystem. The issue involves puppet arbitrary command execution. Remediation is available by upgrading affected packages to version 2.6.15, 2.7.13.

CVE-2012-1988 at a Glance

CVE Identifier CVE-2012-1988
GHSA Identifier GHSA-6xxq-j39w-g3f6
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Puppet
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix CVE-2012-1988

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.15
Upgrade puppet to 2.6.15
puppet fixed: 2.7.13
Upgrade puppet to 2.7.13
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-1988, 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.15), 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-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. 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

Puppet 2.6.x before 2.6.15 and 2.7.x before 2.7.13, and Puppet Enterprise (PE) Users 1.0, 1.1, 1.2.x, 2.0.x, and 2.5.x before 2.5.1 allows remote authenticated users with agent SSL keys and file-creation permissions on the puppet master to execute arbitrary commands by creating a file whose full pathname contains shell metacharacters, then performing a filebucket request.

CVE-2012-1988 Affected Puppet Versions

2 component(s)
Fixed Versions:
2.6.152.7.13
Product / Package Ecosystem Affected Versions Fixed Version
puppet
RubyGems
≥ 2.6.0
< 2.6.15
2.6.15
puppet
RubyGems
≥ 2.7.0
< 2.7.13
2.7.13

References

NVD — CVE-2012-1988 NVD
https://nvd.nist.gov/vuln/detail/CVE-2012-1988
Security Fix Commit FIX COMMIT
https://github.com/puppetlabs/puppet/commit/0d6d29933e613fe177e9235415919a5428db67bc
Security Fix Commit FIX COMMIT
https://github.com/puppetlabs/puppet/commit/568ded50ec6cc498ad32ff7f086d9f73b5d24c14
Puppet Security Information SECURITY
https://web.archive.org/web/20121031092646/http://www.securityfocus.com/bid/52975
web.archive.org/web/20121025194938/... WEB
https://web.archive.org/web/20121025194938/http://secunia.com/advisories/48743
web.archive.org/web/20121025194830/... WEB
https://web.archive.org/web/20121025194830/http://secunia.com/advisories/49136
web.archive.org/web/20121025113446/... WEB
https://web.archive.org/web/20121025113446/http://secunia.com/advisories/48748
web.archive.org/web/20121025112409/... WEB
https://web.archive.org/web/20121025112409/http://secunia.com/advisories/48789
Puppet Security Information SECURITY
https://web.archive.org/web/20121013181707/http://puppetlabs.com/security/cve/cve-2012-1988
web.archive.org/web/20120816020421/... WEB
https://web.archive.org/web/20120816020421/http://projects.puppetlabs.com/projects/1/wiki/Release_Notes#2.6.15
web.archive.org/web/20120513213112/... WEB
https://web.archive.org/web/20120513213112/http://projects.puppetlabs.com/issues/13518
Puppet Security Information SECURITY
https://web.archive.org/web/20120415105345/http://www.securityfocus.com/bid/52975
hermes.opensuse.org/messages/15087408 WEB
https://hermes.opensuse.org/messages/15087408
hermes.opensuse.org/messages/14523305 WEB
https://hermes.opensuse.org/messages/14523305
Puppet Source Repository REPOSITORY
https://github.com/rubysec/ruby-advisory-db/blob/master/gems/puppet/CVE-2012-1988.yml
Puppet Source Repository REPOSITORY
https://github.com/puppetlabs/puppet
exchange.xforce.ibmcloud.com/vulnerabilities/747... WEB
https://exchange.xforce.ibmcloud.com/vulnerabilities/74796
lists.fedoraproject.org/pipermail/package-a... WEB
http://lists.fedoraproject.org/pipermail/package-announce/2012-April/079227.html
lists.fedoraproject.org/pipermail/package-a... WEB
http://lists.fedoraproject.org/pipermail/package-announce/2012-April/079289.html
lists.fedoraproject.org/pipermail/package-a... WEB
http://lists.fedoraproject.org/pipermail/package-announce/2012-May/080003.html
Puppet Security Information SECURITY
http://projects.puppetlabs.com/issues/13518
Puppet Release RELEASE
http://projects.puppetlabs.com/projects/1/wiki/Release_Notes#2.6.15
Puppet Security Information SECURITY
http://puppetlabs.com/security/cve/cve-2012-1988
ubuntu.com/usn/usn-1419-1 WEB
http://ubuntu.com/usn/usn-1419-1
Puppet Security Information SECURITY
http://www.debian.org/security/2012/dsa-2451

Frequently Asked Questions

What is CVE-2012-1988?
CVE-2012-1988 is a security vulnerability in Puppet involving Puppet Arbitrary Command Execution under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Puppet versions are affected?
Affected versions include releases prior to 2.6.15, 2.7.13 across affected packages: puppet.
What version fixes CVE-2012-1988?
Upgrading to 2.6.15, 2.7.13 (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.15, 2.7.13. Upgrade your dependency to 2.6.15, 2.7.13 or later.
What CWE is associated with CVE-2012-1988?
CVE-2012-1988 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check RubyGems dependencies for CVE-2012-1988?
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-6xxq-j39w-g3f6",
  "modified" : "2024-01-12T16:30:38Z",
  "published" : "2022-05-14T00:56:45Z",
  "aliases" : [ "CVE-2012-1988" ],
  "summary" : "Puppet Arbitrary Command Execution",
  "details" : "Puppet 2.6.x before 2.6.15 and 2.7.x before 2.7.13, and Puppet Enterprise (PE) Users 1.0, 1.1, 1.2.x, 2.0.x, and 2.5.x before 2.5.1 allows remote authenticated users with agent SSL keys and file-creation permissions on the puppet master to execute arbitrary commands by creating a file whose full pathname contains shell metacharacters, then performing a filebucket request.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "puppet"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.6.0"
      }, {
        "fixed" : "2.6.15"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "puppet"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.7.0"
      }, {
        "fixed" : "2.7.13"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2012-1988"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/puppetlabs/puppet/commit/0d6d29933e613fe177e9235415919a5428db67bc"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/puppetlabs/puppet/commit/568ded50ec6cc498ad32ff7f086d9f73b5d24c14"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20121031092646/http://www.securityfocus.com/bid/52975"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20121025194938/http://secunia.com/advisories/48743"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20121025194830/http://secunia.com/advisories/49136"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20121025113446/http://secunia.com/advisories/48748"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20121025112409/http://secunia.com/advisories/48789"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20121013181707/http://puppetlabs.com/security/cve/cve-2012-1988"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20120816020421/http://projects.puppetlabs.com/projects/1/wiki/Release_Notes#2.6.15"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20120513213112/http://projects.puppetlabs.com/issues/13518"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20120415105345/http://www.securityfocus.com/bid/52975"
  }, {
    "type" : "WEB",
    "url" : "https://hermes.opensuse.org/messages/15087408"
  }, {
    "type" : "WEB",
    "url" : "https://hermes.opensuse.org/messages/14523305"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/puppet/CVE-2012-1988.yml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/puppetlabs/puppet"
  }, {
    "type" : "WEB",
    "url" : "https://exchange.xforce.ibmcloud.com/vulnerabilities/74796"
  }, {
    "type" : "WEB",
    "url" : "http://lists.fedoraproject.org/pipermail/package-announce/2012-April/079227.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.fedoraproject.org/pipermail/package-announce/2012-April/079289.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.fedoraproject.org/pipermail/package-announce/2012-May/080003.html"
  }, {
    "type" : "WEB",
    "url" : "http://projects.puppetlabs.com/issues/13518"
  }, {
    "type" : "WEB",
    "url" : "http://projects.puppetlabs.com/projects/1/wiki/Release_Notes#2.6.15"
  }, {
    "type" : "WEB",
    "url" : "http://puppetlabs.com/security/cve/cve-2012-1988"
  }, {
    "type" : "WEB",
    "url" : "http://ubuntu.com/usn/usn-1419-1"
  }, {
    "type" : "WEB",
    "url" : "http://www.debian.org/security/2012/dsa-2451"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-77", "CWE-78" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-01-12T16:30:38Z",
    "nvd_published_at" : "2012-05-29T20:55:00Z"
  }
}