CVE-2022-27651 Non-empty default inheritable capabilities for linux container in Buildah

Medium 6.8 Published Updated

Attackers with access to programs with inheritable file capabilities can elevate privileges within Buildah containers due to incorrect default permission settings.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-27651?

CVE-2022-27651 is a medium-severity vulnerability in Fedoraproject Fedora, published on 4 Apr 2022. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

A flaw was found in buildah where containers were incorrectly started with non-empty default permissions. A bug was found in Moby (Docker Engine) where containers were incorrectly started with non-empty inheritable Linux process capabilities, enabling an attacker with access to programs with inheritable file capabilities to elevate those capabilities to the permitted set when execve(2) runs. This has the potential to impact confidentiality and integrity.

Weakness: CWE-276

Which versions are affected by CVE-2022-27651?

3 open source packages ship an affected version, including github.com/containers/buildah. It affects 3 products.

PackageAffectedFixed in
github.com/containers/buildah GoAll versions1.25.0
github.com/containers/buildah GoAll versions1.25.0
github.com/containers/buildah GoAll versions1.25.0
Linux distribution packages (5)
buildah SUSE:Linux Enterprise Module for Containers 15 SP3All versions1.25.1-150300.8.6.1
buildah SUSE:Linux Enterprise Module for Containers 15 SP4All versions1.25.1-150400.3.3.28
buildah openSUSE:Leap 15.3All versions1.25.1-150300.8.6.1
buildah openSUSE:Leap 15.4All versions1.25.1-150400.3.3.28
buildah openSUSE:TumbleweedAll versions1.25.1-1.1

Products include Buildah Project Buildah, Fedoraproject Fedora, Redhat Enterprise Linux.

How do I fix CVE-2022-27651?

Upgrade github.com/containers/buildah to 1.25.0 or later.

Is CVE-2022-27651 being exploited?

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

All Fedoraproject Fedora vulnerabilities

Sources

Also known as AZL-11513, AZL-36934, AZL-39870, AZL-9318, DEBIAN-CVE-2022-27651, GHSA-c3g4-w6cv-6v7h and 5 more.

Is CVE-2022-27651 in your software?

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

Check your SBOMs for free