CVE-2024-1724
JSON

6.3medium

snapd allows $HOME/bin symlink

Severity
6.3medium CVSS:3.1 by canonical
Exploit likelihood
0.31% (higher than 25% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
canonical
Also known as
GHSA-4mh8-9689-38vrGO-2024-3007

Description

In snapd versions prior to 2.62, when using AppArmor for enforcement of sandbox permissions, snapd failed to restrict writes to the $HOME/bin path. In Ubuntu, when this path exists, it is automatically added to the users PATH. An attacker who could convince a user to install a malicious snap which used the 'home' plug could use this vulnerability to install arbitrary scripts into the users PATH which may then be run by the user outside of the expected snap sandbox and hence allow them to escape confinement.

Affected

Product or packageVersionsReported by
snapdbefore 2.62CVE List
canonical snapdbefore 2.62CVE List, NVD
github.com/snapcore/snapd (Go)before 2.62, all versionsGitHub Advisory Database, Go Vulnerability Database

All scores

canonical6.3medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L
GitHub6.3medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L
NVD8.2high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H

Classification

CWE-732

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

In snapd versions prior to 2.62, when using AppArmor for enforcement of sandbox permissions, snapd failed to restrict writes to the $HOME/bin path. In Ubuntu, when this path exists, it is automatically added to the users PATH. An attacker who could convince a user to install a malicious snap which used the 'home' plug could use this vulnerability to install arbitrary scripts into the users PATH which may then be run by the user outside of the expected snap sandbox and hence allow them to escape confinement.

Go Vulnerability Database

snapd failed to restrict writes to the $HOME/bin path in github.com/snapcore/snapd.

NOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.

(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)

The additional affected modules and versions are: github.com/snapcore/snapd before v2.62.0.

NVD (es)

En versiones de snapd anteriores a la 2.62, cuando se usaba AppArmor para hacer cumplir los permisos de la zona de pruebas, snapd no podía restringir las escrituras en la ruta $HOME/bin. En Ubuntu, cuando esta ruta existe, se agrega automáticamente al PATH del usuario. Un atacante que pudiera convencer a un usuario para que instalara un complemento malicioso que usara el complemento "home" podría usar esta vulnerabilidad para instalar scripts arbitrarios en el PATH del usuario que luego el usuario podría ejecutar fuera del entorno de pruebas esperado y, por lo tanto, permitirle escapar del encierro.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-1724 changed 2024-08-01CVE Terms of Use
GitHub Advisory DatabaseGHSA-4mh8-9689-38vr changed 2026-09-10CC-BY-4.0
Go Vulnerability DatabaseGO-2024-3007 changed 2024-08-06CC-BY-4.0
NVDCVE-2024-1724 changed 2026-06-17Public domain