CVE Vulnerabilities

CVE-2024-29069

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

Published: Jul 25, 2024 | Modified: Aug 26, 2024
CVSS 3.x
7.3
HIGH
Source:
NVD
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
CVSS 2.x
RedHat/V2
RedHat/V3
Ubuntu
MEDIUM

In snapd versions prior to 2.62, snapd failed to properly check the destination of symbolic links when extracting a snap. The snap format is a squashfs file-system image and so can contain symbolic links and other file types. Various file entries within the snap squashfs image (such as icons and desktop files etc) are directly read by snapd when it is extracted. An attacker who could convince a user to install a malicious snap which contained symbolic links at these paths could then cause snapd to write out the contents of the symbolic link destination into a world-readable directory. This in-turn could allow an unprivileged user to gain access to privileged information.

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
Snapd Canonical * 2.62 (excluding)
Snapd Ubuntu bionic *
Snapd Ubuntu devel *
Snapd Ubuntu esm-infra/bionic *
Snapd Ubuntu esm-infra/xenial *
Snapd Ubuntu focal *
Snapd Ubuntu jammy *
Snapd Ubuntu mantic *
Snapd Ubuntu noble *
Snapd Ubuntu oracular *
Snapd Ubuntu snap *
Snapd Ubuntu trusty *
Snapd Ubuntu upstream *
Snapd 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