# CVE-2020-7942: Improper Certificate Validation in Puppet

> Attackers with valid certificates can access other nodes' catalogs by modifying facts, exposing sensitive infrastructure data.

- **Severity:** Medium 6.5 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 19 Feb 2020
- **Updated:** 4 Aug 2024
- **Also known as:** DEBIAN-CVE-2020-7942, GHSA-gqvf-892r-vjm5, SUSE-SU-2020:1057-1

## What is CVE-2020-7942?

CVE-2020-7942 is a medium-severity missing authorization vulnerability in Puppet, published on 19 Feb 2020. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

Previously, Puppet operated on a 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 and 5.5.19 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. Affected software versions: Puppet 6.x prior to 6.13.0 Puppet Agent 6.x prior to 6.13.0 Puppet 5.5.x prior to 5.5.19 Puppet Agent 5.5.x prior to 5.5.19 Resolved in: Puppet 6.13.0 Puppet Agent 6.13.0 Puppet 5.5.19 Puppet Agent 5.5.19

Weakness: CWE-295 (Improper Certificate Validation)

## Which versions are affected by CVE-2020-7942?

4 open source packages ship an affected version, including puppet. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `puppet` | RubyGems | All versions | 5.5.19 |
| `puppet` | RubyGems | All versions | 5.5.19 |
| `puppet` | RubyGems | From 6.0.0 | 6.13.0 |
| `puppet` | RubyGems | From 6.0.0 | 6.13.0 |
| `puppet` | SUSE:Linux Enterprise Module for Advanced Systems Management 12 | All versions | 3.8.5-15.12.1 |

Products: Puppet Puppet, Puppet Puppet Agent.

## How do I fix CVE-2020-7942?

Upgrade puppet to a fixed version for your release line: 5.5.19 or 6.13.0.

## Is CVE-2020-7942 being exploited?

There is no known exploitation of CVE-2020-7942 in the wild and no public exploit code.

## Other vulnerabilities in Puppet

- [CVE-2016-2785](https://insights.sbomify.com/CVE-2016-2785/): Puppet Improper Access Control (critical 9.8)
- [CVE-2021-27021](https://insights.sbomify.com/CVE-2021-27021/): SQL injection in Puppet DB (high 8.8)
- [CVE-2018-6513](https://insights.sbomify.com/CVE-2018-6513/): Privilege escalation in Puppet Enterprise and Puppet Agent (high 8.8)
- [CVE-2018-6514](https://insights.sbomify.com/CVE-2018-6514/): Privilege escalation in Puppet Agent (high 7.8)
- [CVE-2018-6515](https://insights.sbomify.com/CVE-2018-6515/): Code injection in Puppet Agent (high 7.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-7942 and fix it if it is affected.

What it is: CVE-2020-7942 is a medium-severity missing authorization vulnerability in Puppet, published on 19 Feb 2020. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2020-7942 in the wild and no public exploit code.

Affected packages and fixed versions:
- puppet (RubyGems): affected all versions; fixed in 5.5.19
- puppet (RubyGems): affected all versions; fixed in 5.5.19
- puppet (RubyGems): affected from 6.0.0; fixed in 6.13.0
- puppet (RubyGems): affected from 6.0.0; fixed in 6.13.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2020-7942/ (Markdown: https://insights.sbomify.com/CVE-2020-7942/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2020-7942
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2020-7942
- OSV: https://osv.dev/vulnerability/CVE-2020-7942

---
From sbomify Insights: https://insights.sbomify.com/CVE-2020-7942/
Summaries are generated and may contain mistakes; the official description above is the record.
