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 package | Versions | Reported by |
|---|---|---|
| snapd | before 2.62 | CVE List |
| canonical snapd | before 2.62 | CVE List, NVD |
| github.com/snapcore/snapd (Go) | before 2.62, all versions | GitHub Advisory Database, Go Vulnerability Database |
All scores
| canonical | 6.3medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L |
| GitHub | 6.3medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L |
| NVD | 8.2high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H |
Classification
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
| https://github.com/snapcore/snapd/commit/aa191f97713de8dc3ce3ac818539f0b976eb8ef6 | fix, patch, web | |
| https://gld.mcphail.uk/posts/explaining-cve-2024-1724/ | exploit, technical-description, third-party-advisory | |
| https://github.com/snapcore/snapd/pull/13689 | fix, issue-tracking, patch, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2024-1724 | advisory | |
| https://github.com/snapcore/snapd | package | |
| https://gld.mcphail.uk/posts/explaining-cve-2024-1724 | web | |
| https://pkg.go.dev/vuln/GO-2024-3007 | web | |
| https://github.com/advisories/GHSA-4mh8-9689-38vr | advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-1724 changed 2024-08-01 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-4mh8-9689-38vr changed 2026-09-10 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2024-3007 changed 2024-08-06 | CC-BY-4.0 |
| NVD | CVE-2024-1724 changed 2026-06-17 | Public domain |