CVE-2020-7942: Puppet Improper Certificate Validation Vulnerability

MODERATE
Advisory Identifier: GHSA-gqvf-892r-vjm5
CVSS 6.5
CWE-295
Published
Advisory Summary

CVE-2020-7942 is a MODERATE (CVSS 6.5) improper certificate validation vulnerability (CWE-295: Improper Certificate Validation) affecting Puppet libraries in the RubyGems ecosystem. The issue involves improper certificate validation in puppet. Remediation is available by upgrading affected packages to version 6.13.0, 5.5.19.

CVE-2020-7942 at a Glance

CVE Identifier CVE-2020-7942
GHSA Identifier GHSA-gqvf-892r-vjm5
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-295: Improper Certificate Validation
Affected Product Puppet
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2020-7942

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: 6.13.0
Upgrade puppet to 6.13.0
puppet fixed: 5.5.19
Upgrade puppet to 5.5.19
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-2020-7942, 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 6.13.0), 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-295: Improper Certificate Validation, where the product does not validate, or incorrectly validates, a certificate. 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

Previously, Puppet operated on the model that a node with a valid certificate was entitled to all information in the system and that a compromised certificate allowed access to everything in the infrastructure. When a node's catalog falls back to the `default` node, the catalog can be retrieved for a different node by modifying facts for the Puppet run. This issue can be mitigated by setting `strict_hostname_checking = true` in `puppet.conf` on your Puppet master. Puppet 6.13.0 changes the default behavior for strict_hostname_checking from false to true. It is recommended that Puppet Open Source and Puppet Enterprise users that are not upgrading still set strict_hostname_checking to true to ensure secure behavior.

CVE-2020-7942 Affected Puppet Versions

2 component(s)
Fixed Versions:
6.13.05.5.19
Product / Package Ecosystem Affected Versions Fixed Version
puppet
RubyGems
≥ 6.0.0
< 6.13.0
6.13.0
puppet
RubyGems
< 5.5.19
5.5.19

References

Frequently Asked Questions

What is CVE-2020-7942?
CVE-2020-7942 is a security vulnerability in Puppet involving Improper Certificate Validation in Puppet under CWE-295: Improper Certificate Validation.
Which Puppet versions are affected?
Affected versions include releases prior to 6.13.0, 5.5.19 across affected packages: puppet.
What version fixes CVE-2020-7942?
Upgrading to 6.13.0, 5.5.19 (or the latest patched release for your respective branch) resolves the vulnerability.
Is puppet affected?
Yes, puppet is affected in releases prior to 6.13.0, 5.5.19. Upgrade your dependency to 6.13.0, 5.5.19 or later.
What is the CVSS score of CVE-2020-7942?
CVE-2020-7942 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2020-7942?
CVE-2020-7942 is classified under CWE-295: Improper Certificate Validation (The product does not validate, or incorrectly validates, a certificate.).
How can I check RubyGems dependencies for CVE-2020-7942?
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-gqvf-892r-vjm5",
  "modified" : "2023-07-05T19:26:32Z",
  "published" : "2021-04-13T15:42:19Z",
  "aliases" : [ "CVE-2020-7942" ],
  "summary" : "Improper Certificate Validation in Puppet",
  "details" : "Previously, Puppet operated on the model that a node with a valid certificate was entitled to all information in the system and that a compromised certificate allowed access to everything in the infrastructure. When a node's catalog falls back to the `default` node, the catalog can be retrieved for a different node by modifying facts for the Puppet run. This issue can be mitigated by setting `strict_hostname_checking = true` in `puppet.conf` on your Puppet master. Puppet 6.13.0 changes the default behavior for strict_hostname_checking from false to true. It is recommended that Puppet Open Source and Puppet Enterprise users that are not upgrading still set strict_hostname_checking to true to ensure secure behavior.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "puppet"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.0.0"
      }, {
        "fixed" : "6.13.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "puppet"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.5.19"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-7942"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/puppet/CVE-2020-7942.yml"
  }, {
    "type" : "WEB",
    "url" : "https://puppet.com/security/cve/CVE-2020-7942"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-295" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-04-07T23:15:22Z",
    "nvd_published_at" : "2020-02-19T21:15:00Z"
  }
}