Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. coreos-installer
  4. ›
  5. CVE-2021-20319

CVE-2021-20319: coreos-installer improperly verifies GPG signature when decompressing gzipped artifact

October 12, 2021 (updated June 1, 2022)

coreos-installer fails to correctly verify GPG signatures when decompressing gzip-compressed artifacts. This allows bypass of signature verification in cases where coreos-installer decompresses a downloaded OS image, allowing an attacker who can modify the OS image to compromise a newly-installed system.

Default installations from ISO or PXE media in Fedora CoreOS, RHEL CoreOS, and RHEL for Edge are not affected, as coreos-installer installs from an OS image shipped as part of the install media.

These flows are affected:

  1. Installing with --image-file, --image-url, or coreos.inst.image_url. For example, if a user has a local mirror of installation images, an attacker could replace an image with a gzip-compressed alternative (even if the file extension is .xz). The result:
$ coreos-installer install --image-url http://localhost:8080/image.xz /dev/loop0
Downloading image from http://localhost:8080/image.xz
Downloading signature from http://localhost:8080/image.xz.sig
> Read disk 749.9 MiB/749.9 MiB (100%)
gpg: Signature made Mon 20 Sep 2021 02:41:50 PM EDT
gpg: using RSA key 8C5BA6990BDB26E19F2A1A801161AE6945719A39
gpg: BAD signature from "Fedora (34) <fedora-34-primary@fedoraproject.org>" [ultimate]
Install complete.

Notice that GPG reports a bad signature, but coreos-installer continues anyway. Automation that relies on coreos-installer’s exit status will not notice either.

  1. coreos-installer download --decompress --image-url:
$ coreos-installer download --decompress --image-url http://localhost:8080/image.xz
> Read disk 749.9 MiB/749.9 MiB (100%)
gpg: Signature made Mon 20 Sep 2021 02:41:50 PM EDT
gpg: using RSA key 8C5BA6990BDB26E19F2A1A801161AE6945719A39
gpg: BAD signature from "Fedora (34) <fedora-34-primary@fedoraproject.org>" [ultimate]
./image

Again, coreos-installer reports success.

  1. Installing with default parameters, when not installing from the image built into live ISO or PXE media, if the hosting service is compromised or if an active attacker gains control of the HTTPS response.

  2. coreos-installer download --decompress if the hosting service is compromised or if an active attacker gains control of the HTTPS response.

References

  • bugzilla.redhat.com/show_bug.cgi?id=2011862
  • github.com/advisories/GHSA-3r3g-g73x-g593
  • github.com/coreos/coreos-installer
  • github.com/coreos/coreos-installer/pull/655
  • github.com/coreos/coreos-installer/pull/659/commits/ad243c6f0eff2835b2da56ca5f7f33af76253c89
  • github.com/coreos/coreos-installer/security/advisories/GHSA-3r3g-g73x-g593
  • nvd.nist.gov/vuln/detail/CVE-2021-20319

Code Behaviors & Features

Detect and mitigate CVE-2021-20319 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.10.1

Fixed versions

  • 0.10.1

Solution

Upgrade to version 0.10.1 or above.

Impact 7.8 HIGH

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

Learn more about CVSS

Weakness

  • CWE-347: Improper Verification of Cryptographic Signature

Source file

cargo/coreos-installer/CVE-2021-20319.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:00 +0000.