CVE Vulnerabilities

CVE-2022-4122

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

Published: Dec 08, 2022 | Modified: Nov 21, 2024
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

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

Name Vendor Start Version End Version
Podman Podman_project 4.3.0 (including) 4.3.0 (including)
Red Hat Enterprise Linux 8.8 Extended Update Support RedHat container-tools:rhel8-8080020240422101606.0f77c1b7 *
Red Hat Enterprise Linux 9 RedHat podman-2:5.2.2-1.el9 *
Golang-github-containers-buildah Ubuntu kinetic *
Golang-github-containers-buildah Ubuntu lunar *
Golang-github-containers-buildah Ubuntu mantic *
Golang-github-containers-buildah Ubuntu trusty *
Golang-github-containers-buildah Ubuntu xenial *

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