CVE-2021-3445

Description

A flaw was found in libdnf's signature verification functionality. This flaw allows an attacker to achieve code execution if they can alter the header information of an RPM package and then trick a user or system into installing it. The highest risk of this vulnerability is to confidentiality, integrity, as well as system availability.

Statement

The exploitation of this flaw requires RPM's package verification level to be set to "digest" or "none". In addition, to exploit this flaw, an attacker must either compromise an RPM repository or convince an administrator to install an untrusted RPM. It is strongly recommended to only use RPMs from trusted repositories.

Mitigation

A mitigation for this flaw is to set %_pkgverify_level all` or `%_pkgverify_level signature` in `/etc/rpm/macros`.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score6.47.5N/A
Attack VectorNetworkNetworkN/A
Attack ComplexityHighHighN/A
Privileges RequiredHighNoneN/A
User InteractionRequiredRequiredN/A
ScopeUnchangedUnchangedN/A
ConfidentialityHighHighN/A
Integrity ImpactHighHighN/A
Availability ImpactHighHighN/A

Vector

Red Hat: CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H

NVD: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H

Red Hat CVSS v3 Score Explanation

We marked AC:H because the package verification level must be set to "digest" or "none", which is out of an attacker's control. Additionally, an RPM would need to be placed into a repository, so an attacker would need to compromise an RPM repository or perform a Man-in-the-middle attack (in case of no TLS) to modify the RPM first, or trick a system administrator into installing it from another source. PR:H because the above scenarios require elevated privileges to perform.

Understanding the Weakness (CWE)

Access Control,Integrity,Confidentiality

Technical Impact: Gain Privileges or Assume Identity; Modify Application Data; Execute Unauthorized Code or Commands

An attacker could gain access to sensitive data and possibly execute unauthorized code.

Acknowledgements

Red Hat would like to thank Demi M. Obenour for reporting this issue.

Frequently Asked Questions

Want to get errata notifications? Sign up here.