CVE-2021-4120
snapd could be made to bypass intended access restrictions through snap content interfaces and layout paths
snapd 2.54.2 fails to perform sufficient validation of snap content interface and layout paths, resulting in the ability for snaps to inject arbitrary AppArmor policy rules via malformed content interface and layout declarations and hence escape strict snap confinement. Fixed in snapd versions 2.54.3+18.04, 2.54.3+20.04 and 2.54.3+21.10.1
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
8.2
snapd could be made to bypass intended access restrictions through snap content interfaces and layout paths
snapd 2.54.2 fails to perform sufficient validation of snap content interface and layout paths, resulting in the ability for snaps to inject arbitrary AppArmor policy rules via malformed content interface and layout declarations and hence escape strict snap confinement. Fixed in snapd versions 2.54.3+18.04, 2.54.3+20.04 and 2.54.3+21.10.1
- Record
CVE-2021-4120- CVSS 3.1
- 8.2 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H - Weakness
- CWE-20
- Updated
- 2026-11-02
EUVDEUVD-2021-33996
8.2
snapd 2.54.2 fails to perform sufficient validation of snap content interface and layout paths, resulting in the ability for snaps to inject arbitrary AppArmor policy rules via malformed content interface and layout declarations and hence escape strict snap confinement. Fixed in snapd versions 2.54.3+18.04, 2.54.3+20.04 and 2.54.3+21.10.1
- Record
EUVD-2021-33996- CVSS 3.1
- 8.2 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-hfvx-54vj-h9wq No score
snapd 2.54.2 fails to perform sufficient validation of snap content interface and layout paths,...
snapd 2.54.2 fails to perform sufficient validation of snap content interface and layout paths, resulting in the ability for snaps to inject arbitrary AppArmor policy rules via malformed content interface and layout declarations and hence escape strict snap confinement. Fixed in snapd versions 2.54.3+18.04, 2.54.3+20.04 and 2.54.3+21.10.1
- Record
GHSA-hfvx-54vj-h9wq- Weakness
- CWE-20
- Updated
- 2026-11-02
NVD
8.2
snapd 2.54.2 fails to perform sufficient validation of snap content interface and layout paths, resulting in the ability for snaps to inject arbitrary AppArmor policy rules via malformed content interface and layout declarations and hence escape strict snap confinement. Fixed in snapd versions 2.54.3+18.04, 2.54.3+20.04 and 2.54.3+21.10.1
- Record
CVE-2021-4120- CVSS 3.1
- 8.2 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H - CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - CVSS 2.0
- 4.6 Medium
AV:L/AC:L/Au:N/C:P/I:P/A:P - Weakness
- CWE-20
- Updated
- 2026-11-02
OSV
7.8
snapd 2.54.2 fails to perform sufficient validation of snap content interface and layout paths, resulting in the ability for snaps to inject arbitrary AppArmor policy rules via malformed content interface and layout declarations and hence escape strict snap confinement. Fixed in snapd versions 2.54.3+18.04, 2.54.3+20.04 and 2.54.3+21.10.1
- Record
CVE-2021-4120- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVDEBIAN-CVE-2021-4120
7.8
snapd 2.54.2 fails to perform sufficient validation of snap content interface and layout paths, resulting in the ability for snaps to inject arbitrary AppArmor policy rules via malformed content interface and layout declarations and hence escape strict snap confinement. Fixed in snapd versions 2.54.3+18.04, 2.54.3+20.04 and 2.54.3+21.10.1
- Record
DEBIAN-CVE-2021-4120- CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
Show 4 moreShow less
OSVUBUNTU-CVE-2021-4120
8.2
snapd 2.54.2 fails to perform sufficient validation of snap content interface and layout paths, resulting in the ability for snaps to inject arbitrary AppArmor policy rules via malformed content interface and layout declarations and hence escape strict snap confinement. Fixed in snapd versions 2.54.3+18.04, 2.54.3+20.04 and 2.54.3+21.10.1
- Record
UBUNTU-CVE-2021-4120- CVSS 3.1
- 8.2 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H - CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVUSN-5292-1 No score
snapd vulnerabilities
James Troup discovered that snap did not properly manage the permissions for the snap directories. A local attacker could possibly use this issue to expose sensitive information. (CVE-2021-3155)
Ian Johnson discovered that snapd did not properly validate content interfaces and layout paths. A local attacker could possibly use this issue to inject arbitrary AppArmor policy rules, resulting in a bypass of intended access restrictions. (CVE-2021-4120)
The Qualys Research Team discovered that snapd did not properly validate the location of the snap-confine binary. A local attacker could possibly use this issue to execute other arbitrary binaries and escalate privileges. (CVE-2021-44730)
The Qualys Research Team discovered that a race condition existed in the snapd snap-confine binary when preparing a private mount namespace for a snap. A local attacker could possibly use this issue to escalate privileges and execute arbitrary code. (CVE-2021-44731)
- Record
USN-5292-1- Updated
- 2026-11-02
OSVUSN-5292-2 No score
snapd vulnerabilities
USN-5292-1 fixed vulnerabilities in snapd. This update provides the corresponding update for the riscv64 architecture.
Original advisory details:
James Troup discovered that snap did not properly manage the permissions for the snap directories. A local attacker could possibly use this issue to expose sensitive information. (CVE-2021-3155)
Ian Johnson discovered that snapd did not properly validate content interfaces and layout paths. A local attacker could possibly use this issue to inject arbitrary AppArmor policy rules, resulting in a bypass of intended access restrictions. (CVE-2021-4120)
The Qualys Research Team discovered that snapd did not properly validate the location of the snap-confine binary. A local attacker could possibly use this issue to execute other arbitrary binaries and escalate privileges. (CVE-2021-44730)
The Qualys Research Team discovered that a race condition existed in the snapd snap-confine binary when preparing a private mount namespace for a snap. A local attacker could possibly use this issue to escalate privileges and execute arbitrary code. (CVE-2021-44731)
- Record
USN-5292-2- Updated
- 2026-11-02
OSVUSN-5292-3 No score
snapd vulnerabilities
USN-5292-1 fixed several vulnerabilities in snapd. This update provides the corresponding update for Ubuntu 14.04 ESM and Ubuntu 16.04 ESM.
Original advisory details:
James Troup discovered that snap did not properly manage the permissions for the snap directories. A local attacker could possibly use this issue to expose sensitive information. (CVE-2021-3155)
Ian Johnson discovered that snapd did not properly validate content interfaces and layout paths. A local attacker could possibly use this issue to inject arbitrary AppArmor policy rules, resulting in a bypass of intended access restrictions. (CVE-2021-4120)
The Qualys Research Team discovered that snapd did not properly validate the location of the snap-confine binary. A local attacker could possibly use this issue to execute other arbitrary binaries and escalate privileges. (CVE-2021-44730)
The Qualys Research Team discovered that a race condition existed in the snapd snap-confine binary when preparing a private mount namespace for a snap. A local attacker could possibly use this issue to escalate privileges and execute arbitrary code. (CVE-2021-44731)
- Record
USN-5292-3- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
snapdDebian:12 |
before 2.54.3-1 | 2.54.3-1 |
snapdDebian:13 |
before 2.54.3-1 | 2.54.3-1 |
snapdDebian:14 |
before 2.54.3-1 | 2.54.3-1 |
snapdUbuntu:Pro:14.04:LTS |
before 2.54.3+14.04~esm1, plus listed versions 2.21~14.04.22.22.2~14.042.22.3~14.042.22.6~14.042.23.1~14.04 Show 13 moreShow less2.24.1~14.042.25~14.042.26.10~14.042.27.5~14.042.28.5~14.042.29.4.2~14.042.32.3.2~14.042.32.9~14.042.33.1~14.042.34.2~14.042.34.2~14.04.12.37.4~14.04.12.38~14.04 |
2.54.3+14.04~esm1 |
snapdUbuntu:Pro:16.04:LTS |
before 2.54.3+16.04~esm2, plus listed versions 1.91.9.1.11.9.22.02.0.1 Show 43 moreShow less2.0.22.0.32.0.52.0.82.0.92.0.102.11+0.16.042.12+0.16.042.132.14.2~16.042.15.2ubuntu12.16ubuntu32.17.1ubuntu12.20.1ubuntu12.212.22.22.22.32.22.62.23.12.24.12.252.26.102.27.52.28.52.29.4.22.32.3.22.32.92.33.1ubuntu22.34.22.34.2ubuntu0.12.37.42.37.4ubuntu0.12.382.39.22.39.2ubuntu0.22.402.42.12.45.12.45.1ubuntu0.22.46.12.47.12.482.48.3 |
2.54.3+16.04~esm2 |
snapdUbuntu:18.04:LTS |
before 2.54.3+18.04, plus listed versions 2.28.5+17.102.29.4.1+18.042.29.4.2+18.042.31.1+18.042.32+18.04~pre5 Show 26 moreShow less2.32+18.04~pre62.32+18.042.32.3.2+18.042.32.5+18.042.32.8+18.042.32.9+18.042.33.1+18.04ubuntu22.34.2+18.042.34.2+18.04.12.37.1+18.042.37.1.1+18.042.37.4+18.042.37.4+18.04.12.38+18.042.39.2+18.042.40+18.042.42.1+18.042.45.1+18.042.45.1+18.04.22.46.1+18.042.47.1+18.042.48+18.042.48.3+18.042.49.2+18.042.51.1+18.042.54.2+18.04ubuntu1 |
2.54.3+18.04 |
snapdUbuntu:20.04:LTS |
before 2.54.3+20.04.1, plus listed versions 2.41+19.10.12.42.1+20.042.43.3+git1.8109f82.44~pre1+20.042.44+20.04 Show 12 moreShow less2.44.2+20.042.44.3+20.042.45.1+20.042.45.1+20.04.22.46.1+20.042.47.1+20.042.48+20.042.48.3+20.042.49.2+20.042.51.1+20.04ubuntu22.54.2+20.04ubuntu22.54.3+20.04 |
2.54.3+20.04.1 |
snapdUbuntu:18.04:LTS From an advisory covering 4 CVEs |
before 2.54.3+18.04, plus listed versions 2.28.5+17.102.29.4.1+18.042.29.4.2+18.042.31.1+18.042.32+18.04~pre5 Show 26 moreShow less2.32+18.04~pre62.32+18.042.32.3.2+18.042.32.5+18.042.32.8+18.042.32.9+18.042.33.1+18.04ubuntu22.34.2+18.042.34.2+18.04.12.37.1+18.042.37.1.1+18.042.37.4+18.042.37.4+18.04.12.38+18.042.39.2+18.042.40+18.042.42.1+18.042.45.1+18.042.45.1+18.04.22.46.1+18.042.47.1+18.042.48+18.042.48.3+18.042.49.2+18.042.51.1+18.042.54.2+18.04ubuntu1 |
2.54.3+18.04 |
snapdUbuntu:20.04:LTS From an advisory covering 4 CVEs |
before 2.54.3+20.04, plus listed versions 2.41+19.10.12.42.1+20.042.43.3+git1.8109f82.44~pre1+20.042.44+20.04 Show 11 moreShow less2.44.2+20.042.44.3+20.042.45.1+20.042.45.1+20.04.22.46.1+20.042.47.1+20.042.48+20.042.48.3+20.042.49.2+20.042.51.1+20.04ubuntu22.54.2+20.04ubuntu2 |
2.54.3+20.04 |
snapdUbuntu:20.04:LTS From an advisory covering 4 CVEs |
before 2.54.3+20.04.1, plus listed versions 2.41+19.10.12.42.1+20.042.43.3+git1.8109f82.44~pre1+20.042.44+20.04 Show 12 moreShow less2.44.2+20.042.44.3+20.042.45.1+20.042.45.1+20.04.22.46.1+20.042.47.1+20.042.48+20.042.48.3+20.042.49.2+20.042.51.1+20.04ubuntu22.54.2+20.04ubuntu22.54.3+20.04 |
2.54.3+20.04.1 |
snapdUbuntu:Pro:14.04:LTS From an advisory covering 4 CVEs |
before 2.54.3+14.04~esm1, plus listed versions 2.21~14.04.22.22.2~14.042.22.3~14.042.22.6~14.042.23.1~14.04 Show 13 moreShow less2.24.1~14.042.25~14.042.26.10~14.042.27.5~14.042.28.5~14.042.29.4.2~14.042.32.3.2~14.042.32.9~14.042.33.1~14.042.34.2~14.042.34.2~14.04.12.37.4~14.04.12.38~14.04 |
2.54.3+14.04~esm1 |
snapdUbuntu:Pro:16.04:LTS From an advisory covering 4 CVEs |
before 2.54.3+16.04~esm2, plus listed versions 1.91.9.1.11.9.22.02.0.1 Show 43 moreShow less2.0.22.0.32.0.52.0.82.0.92.0.102.11+0.16.042.12+0.16.042.132.14.2~16.042.15.2ubuntu12.16ubuntu32.17.1ubuntu12.20.1ubuntu12.212.22.22.22.32.22.62.23.12.24.12.252.26.102.27.52.28.52.29.4.22.32.3.22.32.92.33.1ubuntu22.34.22.34.2ubuntu0.12.37.42.37.4ubuntu0.12.382.39.22.39.2ubuntu0.22.402.42.12.45.12.45.1ubuntu0.22.46.12.47.12.482.48.3 |
2.54.3+16.04~esm2 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-4120 is a high vulnerability (CVSS 8.2) in Canonical Snapd, published February 17, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.44%, the 38th percentile. Fixed in snapd 2.54.3-1.
References
ubuntu.com/security/notices/USN-5292-1
bugs.launchpad.net/snapd/+bug/1949368
openwall.com/lists/oss-security/2022/02/18/2
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3QTBN7LLZISXIA4KU4UKDR27Q5PXDS2U
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XCGHG6LJAVJJ72TMART6A7N4Z6MSTGI7
nvd.nist.gov/vuln/detail/CVE-2021-4120
Show 12 moreShow less
lists.fedoraproject.org/archives/list/[email protected]/message/3QTBN7LLZISXIA4KU4UKDR27Q5PXDS2U
lists.fedoraproject.org/archives/list/[email protected]/message/XCGHG6LJAVJJ72TMART6A7N4Z6MSTGI7
github.com/advisories/GHSA-hfvx-54vj-h9wq
security-tracker.debian.org/tracker/CVE-2021-4120
ubuntu.com/security/CVE-2021-4120
github.com/snapcore/snapd/commit/f3f669d720ed8b0bcb73da7789843bf43b5c16cf
cve.org/CVERecord?id=CVE-2021-4120
ubuntu.com/security/notices/USN-5292-3
ubuntu.com/security/notices/USN-5292-2
ubuntu.com/security/CVE-2021-3155
ubuntu.com/security/CVE-2021-44730
ubuntu.com/security/CVE-2021-44731