# CVE-2021-4120: snapd could be made to bypass intended access restrictions through snap content interfaces and layout paths

- Severity: High 8.2 (CVSS:3.1, scored by canonical) `CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.44%, higher than 39% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2022-02-17T22:15:21.000Z
- Modified: 2026-06-17T04:19:04.030Z
- Weaknesses: CWE-20
- Assigned by: canonical

## Description

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

(As written by CVE List.)

## Affected

- Canonical Ltd. snapd: from unspecified up to 2.54.2
- canonical snapd: up to 2.54.2
- canonical ubuntu_linux: 18.04; 20.04; 21.10
- fedoraproject fedora: 34; 35

## Every score

- canonical: 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`
- NVD: 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`
- NVD: CVSS:2.0 4.6 Medium `AV:L/AC:L/Au:N/C:P/I:P/A:P`

## References

- <https://bugs.launchpad.net/snapd/+bug/1949368> (exploit, issue-tracking, third-party-advisory)
- <http://www.openwall.com/lists/oss-security/2022/02/18/2> (exploit, mailing-list, third-party-advisory)
- <https://ubuntu.com/security/notices/USN-5292-1> (patch, vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3QTBN7LLZISXIA4KU4UKDR27Q5PXDS2U/> (vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XCGHG6LJAVJJ72TMART6A7N4Z6MSTGI7/> (vendor-advisory)

## Sources

- CVE List: [CVE-2021-4120](https://www.cve.org/CVERecord?id=CVE-2021-4120), CVE Terms of Use, modified 2024-08-03
- NVD: [CVE-2021-4120](https://nvd.nist.gov/vuln/detail/CVE-2021-4120), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-4120 · Whole record: https://cve.day/CVE-2021-4120.json · Rebuilt by cve.day 2026-11-25T22:58:06.997Z
