CVE-2022-24778 Incorrect Authorization in imgcrypt

High 7.5 Published Updated

Attackers can bypass authorization checks to run previously decrypted encrypted container images on systems with multi-architecture manifests.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-24778?

CVE-2022-24778 is a high-severity missing authorization vulnerability in Fedoraproject Fedora, published on 25 Mar 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

The imgcrypt library provides API exensions for containerd to support encrypted container images and implements the ctd-decoder command line tool for use by containerd to decrypt encrypted container images. The imgcrypt function `CheckAuthorization` is supposed to check whether the current used is authorized to access an encrypted image and prevent the user from running an image that another user previously decrypted on the same system. In versions prior to 1.1.4, a failure occurs when an image with a ManifestList is used and the architecture of the local host is not the first one in the ManifestList. Only the first architecture in the list was tested, which may not have its layers available locally since it could not be run on the host architecture. Therefore, the verdict on unavailable layers was that the image could be run anticipating that image run failure would occur later due to the layers not being available. However, this verdict to allow the image to run enabled other architectures in the ManifestList to run an image without providing keys if that image had previously been decrypted. A patch has been applied to imgcrypt 1.1.4. Workarounds may include usage of different namespaces for each remote user.

Weakness: CWE-863

Which versions are affected by CVE-2022-24778?

3 open source packages ship an affected version, including github.com/containerd/imgcrypt. It affects 2 products.

PackageAffectedFixed in
github.com/containerd/imgcrypt GoAll versions1.1.4
github.com/containerd/imgcrypt GoAll versions1.1.4
github.com/containerd/imgcrypt GoAll versions1.1.4

Products include Fedoraproject Fedora, Linuxfoundation Imgcrypt.

How do I fix CVE-2022-24778?

Upgrade github.com/containerd/imgcrypt to 1.1.4 or later.

Upgrade, and check permissions on every request on the server, not only in the interface. More about Missing authorization.

Is CVE-2022-24778 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-24778 exists.

All Fedoraproject Fedora vulnerabilities

Sources

Also known as GHSA-8v99-48m9-c8pm, GO-2021-0412, UBUNTU-CVE-2022-24778.

Is CVE-2022-24778 in your software?

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

Check your SBOMs for free