CVE-2013-1640
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedThe (1) template and (2) inline_template functions in the master server in Puppet before 2.6.18, 2.7.x before 2.7.21, and 3.1.x before 3.1.1, and Puppet Enterprise before 1.2.7 and 2.7.x before 2.7.2 allows remote authenticated users to execute arbitrary code via a crafted catalog request.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceThe template and inline_template functions in Puppet master server allow remote authenticated users to execute arbitrary code by sending crafted catalog requests. This is a code injection vulnerability where user-supplied input in template functions is not properly sanitized, allowing attackers with valid Puppet agent credentials to execute commands on the Puppet master.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data= 11.10= 12.04= 12.10< 2.6.18>= 2.7.0, < 2.7.21= 3.1.0< 1.2.7= 2.7.0= 2.7.1CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Authentication
- Single
- Confidentiality
- Complete
- Integrity
- Complete
- Availability
- Complete
AV:N/AC:L/Au:S/C:C/I:C/A:C
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify Puppet versionRun 'puppet --version' on the Puppet master server to obtain the installed version numberAffected if The version is less than 2.6.18, OR between 2.7.0 and 2.7.21 inclusive, OR exactly 3.1.0 (for open-source Puppet); or less than 1.2.7, or exactly 2.7.0 or 2.7.1 (for Puppet Enterprise)
-
Confirm Puppet master is runningCheck if the puppetmasterd or puppet master process is running (e.g., 'ps aux | grep puppetmaster' or 'systemctl status puppetmaster' depending on OS)Affected if The Puppet master service is active - this vulnerability only affects the Puppet master server, not agent-only installations
-
Locate template function usage in manifestsSearch Puppet manifest files (typically in /etc/puppet/manifests or /etc/puppetlabs/puppet/environments/*/manifests) for occurrences of 'template(' or 'inline_template(' function callsAffected if The manifests contain template() or inline_template() calls that process user-influenced data - these are the vectors for code injection
-
Verify remote authentication is enabledCheck /etc/puppet/auth.conf or /etc/puppetlabs/puppet/auth.conf for allow/deny rules, and verify that authenticated remote connections are permitted to the Puppet masterAffected if The Puppet master accepts authenticated remote connections - an attacker needs valid Puppet agent credentials to exploit this flaw
-
Review catalog compilation contextInspect the manifests using template functions to determine whether external or user-supplied data flows into template() or inline_template() calls without sanitizationAffected if Template functions receive unsanitized input from external sources (node variables, hiera data, external nodes, or agent-supplied facts)
The environment is affected if running a vulnerable Puppet or Puppet Enterprise version on the master server AND the manifests contain template/inline_template functions that process external input.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scoped1.2.72.6.182.7.21
Upgrade Puppet to version 2.6.18, 2.7.21, 3.1.1 or later (or Puppet Enterprise to 1.2.7/2.7.2 or later) to patch the code injection vulnerability in template processing.
Puppet: 2.6.18+ / 2.7.21+ / 3.1.1+ | Puppet Enterprise: 1.2.7+ / 2.7.2+ (ideally migrate to currently supported Puppet versions)
- Identify the currently installed Puppet or Puppet Enterprise version using `puppet --version`
- For Puppet 2.6.x: Upgrade to Puppet 2.6.18 or later (note: 2.6.x is end-of-life, consider upgrading to a supported branch)
- For Puppet 2.7.x: Upgrade to Puppet 2.7.21 or later (note: 2.7.x is end-of-life, consider upgrading to a supported branch)
- For Puppet 3.1.x: Upgrade to Puppet 3.1.1 or later (note: 3.x is end-of-life, consider upgrading to a supported branch)
- For Puppet Enterprise 1.x: Upgrade to 1.2.7 or later
- For Puppet Enterprise 2.7.x: Upgrade to 2.7.2 or later
- After upgrade, verify the version with `puppet --version` and test that templates function correctly
- On Ubuntu systems, apply security updates via `sudo apt-get update && sudo apt-get install puppet` or use Landscape for managed updates
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation4.0 h
- Implementation8.0 h
- Testing4.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $5,120.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2013-1640 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2013-1640 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data