CVE-2022-4122 Buildah (as part of Podman) vulnerable to Link Following

Medium 5.3 Published Updated

Attackers can read arbitrary files via symlink traversal in ignore files, exposing sensitive data to unauthorized users.

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-4122?

CVE-2022-4122 is a medium-severity path traversal vulnerability in Fedoraproject Fedora, published on 8 Dec 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

A vulnerability was found in buildah. Incorrect following of symlinks while reading .containerignore and .dockerignore results in information disclosure.

Weakness: CWE-59

Which versions are affected by CVE-2022-4122?

6 open source packages ship an affected version, including github.com/containers/podman/v4, github.com/containers/podman and github.com/containers/podman/v2. It affects 2 products.

PackageAffectedFixed in
github.com/containers/podman/v4 GoAll versions4.5.0
github.com/containers/podman/v4 GoAll versions4.5.0
github.com/containers/podman/v4 GoAll versions4.5.0
github.com/containers/podman GoAll versionsNone
github.com/containers/podman/v2 GoAll versionsNone
github.com/containers/podman/v3 GoAll versionsNone

Products include Fedoraproject Fedora, Podman Project Podman.

How do I fix CVE-2022-4122?

Upgrade github.com/containers/podman/v4 to 4.5.0 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2022-4122 being exploited?

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

All Fedoraproject Fedora vulnerabilities

Sources

Also known as AZL-44526, DEBIAN-CVE-2022-4122, GHSA-4crw-w8pw-2hmf, GO-2022-1151, UBUNTU-CVE-2022-4122.

Is CVE-2022-4122 in your software?

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

Check your SBOMs for free