Ubuntu LinuxOperating system · Canonical

CVE-2013-1640

HIGH · 9.0 CVSS v2.0 Published 2013-03-20
Fix available
A fix is available. Upgrade to 1.2.7 / 2.6.18 or later.
See remediation →
96/100
Remediation priority · Urgent
Remotely reachable Zero-click

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 · unedited
The (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 confidence

The 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.

MitigationUpgrade 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.

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
Ubuntu LinuxOperating system
Affected:= 11.10= 12.04= 12.10
PuppetApplication
Affected:< 2.6.18>= 2.7.0, < 2.7.21= 3.1.0
Puppet EnterpriseApplication
Affected:< 1.2.7= 2.7.0= 2.7.1

CVSS 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 checks

Work through these to decide whether this CVE applies to you.

  1. Identify Puppet version
    Run 'puppet --version' on the Puppet master server to obtain the installed version number
    Affected 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)
  2. Confirm Puppet master is running
    Check 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
  3. Locate template function usage in manifests
    Search Puppet manifest files (typically in /etc/puppet/manifests or /etc/puppetlabs/puppet/environments/*/manifests) for occurrences of 'template(' or 'inline_template(' function calls
    Affected if The manifests contain template() or inline_template() calls that process user-influenced data - these are the vectors for code injection
  4. Verify remote authentication is enabled
    Check /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 master
    Affected if The Puppet master accepts authenticated remote connections - an attacker needs valid Puppet agent credentials to exploit this flaw
  5. Review catalog compilation context
    Inspect the manifests using template functions to determine whether external or user-supplied data flows into template() or inline_template() calls without sanitization
    Affected 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.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

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 · scoped
Upgrade available Upgrade to 1.2.7 / 2.6.18 / 2.7.21 or later
Fixed in 1.2.72.6.182.7.21
Interim mitigation

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.

Recommended fix High confidence

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)

  1. Identify the currently installed Puppet or Puppet Enterprise version using `puppet --version`
  2. 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)
  3. 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)
  4. 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)
  5. For Puppet Enterprise 1.x: Upgrade to 1.2.7 or later
  6. For Puppet Enterprise 2.7.x: Upgrade to 2.7.2 or later
  7. After upgrade, verify the version with `puppet --version` and test that templates function correctly
  8. On Ubuntu systems, apply security updates via `sudo apt-get update && sudo apt-get install puppet` or use Landscape for managed updates
Caveat Older Puppet versions may have manifest incompatibilities with newer major versions; test in non-production first. Puppet 2.6/2.7/3.x branches are end-of-life - consider migrating to Puppet 7.x for long-term support.

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Ubuntu Linux Scoped from the published advisory
  • Consultation4.0 h
  • Implementation8.0 h
  • Testing4.0 h
  • Review / QA2.0 h
18.0 hours of engineering $3,200
Get the upgrade done

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 locally
dbcve dependency scanner

Check 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 sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2013-1640 in production — separate from our analysis above.

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.

What this is

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.

What belongs here
  • 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