CVE-2021-3445 Code injection in libdnf

High 7.5 Published Updated

Attackers can execute arbitrary code by altering RPM package headers and tricking users into installing them via libdnf.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2021-3445?

CVE-2021-3445 is a high-severity code injection vulnerability in Fedoraproject Fedora, published on 19 May 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

A flaw was found in libdnf's signature verification functionality in versions before 0.60.1. 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.

Weakness: CWE-347

Which versions are affected by CVE-2021-3445?

It affects 3 products.

Linux distribution packages (26)
libdnf-devel AlmaLinux:8All versions0.63.0-3.el8
dnf Red Hat:enterprise_linux:8::baseosAll versions0:4.7.0-4.el8
dnf-automatic Red Hat:enterprise_linux:8::baseosAll versions0:4.7.0-4.el8
dnf-data Red Hat:enterprise_linux:8::baseosAll versions0:4.7.0-4.el8
dnf-plugins-core Red Hat:enterprise_linux:8::baseosAll versions0:4.0.21-3.el8
libdnf Red Hat:enterprise_linux:8::baseosAll versions0:0.63.0-3.el8
libdnf-debuginfo Red Hat:enterprise_linux:8::baseosAll versions0:0.63.0-3.el8
libdnf-debugsource Red Hat:enterprise_linux:8::baseosAll versions0:0.63.0-3.el8
python3-dnf Red Hat:enterprise_linux:8::baseosAll versions0:4.7.0-4.el8
python3-dnf-plugin-post-transaction-actions Red Hat:enterprise_linux:8::baseosAll versions0:4.0.21-3.el8
python3-dnf-plugin-versionlock Red Hat:enterprise_linux:8::baseosAll versions0:4.0.21-3.el8
python3-dnf-plugins-core Red Hat:enterprise_linux:8::baseosAll versions0:4.0.21-3.el8
python3-hawkey Red Hat:enterprise_linux:8::baseosAll versions0:0.63.0-3.el8
python3-hawkey-debuginfo Red Hat:enterprise_linux:8::baseosAll versions0:0.63.0-3.el8
python3-libdnf Red Hat:enterprise_linux:8::baseosAll versions0:0.63.0-3.el8
python3-libdnf-debuginfo Red Hat:enterprise_linux:8::baseosAll versions0:0.63.0-3.el8
yum Red Hat:enterprise_linux:8::baseosAll versions0:4.7.0-4.el8
yum-utils Red Hat:enterprise_linux:8::baseosAll versions0:4.0.21-3.el8
libdnf-debuginfo Red Hat:enterprise_linux:8::crbAll versions0:0.63.0-3.el8
libdnf-debugsource Red Hat:enterprise_linux:8::crbAll versions0:0.63.0-3.el8
libdnf-devel Red Hat:enterprise_linux:8::crbAll versions0:0.63.0-3.el8
python3-hawkey-debuginfo Red Hat:enterprise_linux:8::crbAll versions0:0.63.0-3.el8
python3-libdnf-debuginfo Red Hat:enterprise_linux:8::crbAll versions0:0.63.0-3.el8
dnf Rocky Linux:8All versions0:4.7.0-4.el8
dnf-plugins-core Rocky Linux:8All versions0:4.0.21-3.el8
libdnf Rocky Linux:8All versions0:0.63.0-3.el8

Products include Fedoraproject Fedora, Redhat Enterprise Linux, Rpm Libdnf.

How do I fix CVE-2021-3445?

Upgrade to a fixed version.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2021-3445 being exploited?

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

All Fedoraproject Fedora vulnerabilities

Sources

Also known as ALSA-2021:4464, CLSA-2022-1646666491, CLSA-2022-1646666523, CLSA-2026-1779434064, DEBIAN-CVE-2021-3445, GHSA-jrcf-96j2-jpvh and 5 more.

Is CVE-2021-3445 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free