CVE Vulnerabilities

CVE-2022-4122

Improper Link Resolution Before File Access ('Link Following')

Published: Dec 08, 2022 | Modified: Apr 22, 2025
CVSS 3.x
5.3
MEDIUM
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
CVSS 2.x
RedHat/V2
RedHat/V3
5.9 MODERATE
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N
Ubuntu
MEDIUM
root.io logo minimus.io logo echo.ai logo

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

Weakness

The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.

Affected Software

NameVendorStart VersionEnd Version
PodmanPodman_project4.3.0 (including)4.3.0 (including)
Red Hat Enterprise Linux 8.8 Extended Update SupportRedHatcontainer-tools:rhel8-8080020240422101606.0f77c1b7*
Red Hat Enterprise Linux 9RedHatpodman-2:5.2.2-1.el9*
Golang-github-containers-buildahUbuntukinetic*
Golang-github-containers-buildahUbuntulunar*
Golang-github-containers-buildahUbuntumantic*
Golang-github-containers-buildahUbuntuoracular*
Golang-github-containers-buildahUbuntuplucky*
Golang-github-containers-buildahUbuntutrusty*
Golang-github-containers-buildahUbuntuxenial*

Potential Mitigations

  • Follow the principle of least privilege when assigning access rights to entities in a software system.
  • Denying access to a file can prevent an attacker from replacing that file with a link to a sensitive file. Ensure good compartmentalization in the system to provide protected areas that can be trusted.

References