CVE-2021-27023: Puppet Unsafe HTTP Redirect Vulnerability

MODERATE
Advisory Identifier: GHSA-93j5-g845-9wqp
CVSS 6.5
Published
Advisory Summary

CVE-2021-27023 is a MODERATE (CVSS 6.5) unsafe http redirect vulnerability (General Security Weakness) affecting Puppet libraries in the RubyGems ecosystem. The issue involves unsafe http redirect in puppet agent and puppet server. Remediation is available by upgrading affected packages to version 7.12.1, 6.25.1.

CVE-2021-27023 at a Glance

CVE Identifier CVE-2021-27023
GHSA Identifier GHSA-93j5-g845-9wqp
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification General Security Weakness
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:N/UI:N/S:U/C:L/I:L/A:N).

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

How to Fix CVE-2021-27023

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: 7.12.1
Upgrade puppet to 7.12.1
puppet fixed: 6.25.1
Upgrade puppet to 6.25.1
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-2021-27023, 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 7.12.1), 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 General Security Weakness. 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

A flaw was discovered in Puppet Agent and Puppet Server that may result in a leak of HTTP credentials when following HTTP redirects to a different host. This is similar to CVE-2018-1000007

CVE-2021-27023 Affected Puppet Versions

2 component(s)
Fixed Versions:
7.12.16.25.1
Product / Package Ecosystem Affected Versions Fixed Version
puppet
RubyGems
≥ 7.0.0
< 7.12.1
7.12.1
puppet
RubyGems
< 6.25.1
6.25.1

References

Frequently Asked Questions

What is CVE-2021-27023?
CVE-2021-27023 is a security vulnerability in Puppet involving Unsafe HTTP Redirect in Puppet Agent and Puppet Server under General Security Weakness.
Which Puppet versions are affected?
Affected versions include releases prior to 7.12.1, 6.25.1 across affected packages: puppet.
What version fixes CVE-2021-27023?
Upgrading to 7.12.1, 6.25.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is puppet affected?
Yes, puppet is affected in releases prior to 7.12.1, 6.25.1. Upgrade your dependency to 7.12.1, 6.25.1 or later.
What is the CVSS score of CVE-2021-27023?
CVE-2021-27023 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2021-27023?
CVE-2021-27023 is classified under General Security Weakness.
How can I check RubyGems dependencies for CVE-2021-27023?
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-93j5-g845-9wqp",
  "modified" : "2021-12-02T17:54:05Z",
  "published" : "2021-12-02T17:52:45Z",
  "aliases" : [ "CVE-2021-27023" ],
  "summary" : "Unsafe HTTP Redirect in Puppet Agent and Puppet Server",
  "details" : "A flaw was discovered in Puppet Agent and Puppet Server that may result in a leak of HTTP credentials when following HTTP redirects to a different host. This is similar to CVE-2018-1000007",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "puppet"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.0.0"
      }, {
        "fixed" : "7.12.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "puppet"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.25.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-27023"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/puppetlabs/puppet"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/puppet/CVE-2021-27023.yml"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/62SELE7EKVKZL4GABFMVYMIIUZ7FPEF7"
  }, {
    "type" : "WEB",
    "url" : "https://puppet.com/security/cve/CVE-2021-27023"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-11-30T14:35:48Z",
    "nvd_published_at" : "2021-11-18T15:15:00Z"
  }
}