CVE-2021-4120 json
snapd could be made to bypass intended access restrictions through snap content interfaces and layout paths
published 2022-02-17 4 y ago modified 2026-06-17 4 mo ago also EUVD-2021-33996
- cvss
- 8.2
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 38%
- public exploits
- 0
- none known
Summary
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
Patch / fix
- snapd Debian 14, Debian 13, Debian 12 2.54.3-1
debian advisories DEBIAN-CVE-2021-4120
- snapd Ubuntu 18.04 LTS 2.54.3+18.04
- snapd Ubuntu 20.04 LTS 2.54.3+20.04.1
- snapd Ubuntu Pro 14.04 LTS 2.54.3+14.04~esm1
- snapd Ubuntu Pro 16.04 LTS 2.54.3+16.04~esm2
ubuntu advisories UBUNTU-CVE-2021-4120
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-4120 updated cvss 8.2
snapd: Insufficient validation of snap content interface and layout paths
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
0.44% chance of exploitation in the next 30 days, higher than 38% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- bugs.launchpad.net https://bugs.launchpad.net/snapd/+bug/1949368 referenced PoC, tagged "exploit" by a source, unverified
- openwall.com http://www.openwall.com/lists/oss-security/2022/02/18/2 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.2 | CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H |
| NVD | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 4.6 | AV:L/AC:L/Au:N/C:P/I:P/A:P |
Affected products
- Canonical Ltd. snapd
Classification
- Weakness
-
- CWE-20 Improper Input Validation
References
-
ubuntu.com
/security/notices/USN-5292-1
patch, vendor-advisory
-
bugs.launchpad.net
/snapd/+bug/1949368
exploit, issue-tracking, third-party-advisory
-
openwall.com
/lists/oss-security/2022/02/18/2
mailing-list, exploit, third-party-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/3QTBN7LLZISXIA4KU4UKDR27Q5PXDS2U/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/XCGHG6LJAVJJ72TMART6A7N4Z6MSTGI7/
vendor-advisory
Sources
- CVE List CVE-2021-4120
- NVD CVE-2021-4120
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.