{"id":"CVE-2021-4120","aliases":["DEBIAN-CVE-2021-4120","EUVD-2021-33996","GHSA-hfvx-54vj-h9wq","UBUNTU-CVE-2021-4120","USN-5292-1","USN-5292-2","USN-5292-3"],"status":"published","title":"snapd could be made to bypass intended access restrictions through snap content interfaces and layout paths","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","severity":{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00437,"percentile":0.38272,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-20"],"published":"2022-02-17T17:00:00Z","modified":"2026-10-24T10:30:48Z","fixes":[{"ecosystem":"Debian:12","package":"snapd","fixed_in":["2.54.3-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"snapd","fixed_in":["2.54.3-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"snapd","fixed_in":["2.54.3-1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:14.04:LTS","package":"snapd","fixed_in":["2.54.3+14.04~esm1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:16.04:LTS","package":"snapd","fixed_in":["2.54.3+16.04~esm2"],"sources":["osv"]},{"ecosystem":"Ubuntu:18.04:LTS","package":"snapd","fixed_in":["2.54.3+18.04"],"sources":["osv"]},{"ecosystem":"Ubuntu:20.04:LTS","package":"snapd","fixed_in":["2.54.3+20.04.1"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Debian:12","package":"snapd","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.54.3-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"snapd","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.54.3-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"snapd","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.54.3-1"}]}]},{"source":"osv","ecosystem":"Ubuntu:Pro:14.04:LTS","package":"snapd","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.54.3+14.04~esm1"}]}],"versions":["2.21~14.04.2","2.22.2~14.04","2.22.3~14.04","2.22.6~14.04","2.23.1~14.04","2.24.1~14.04","2.25~14.04","2.26.10~14.04","2.27.5~14.04","2.28.5~14.04","2.29.4.2~14.04","2.32.3.2~14.04","2.32.9~14.04","2.33.1~14.04","2.34.2~14.04","2.34.2~14.04.1","2.37.4~14.04.1","2.38~14.04"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"snapd","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.54.3+16.04~esm2"}]}],"versions":["1.9","1.9.1.1","1.9.2","2.0","2.0.1","2.0.2","2.0.3","2.0.5","2.0.8","2.0.9","2.0.10","2.11+0.16.04","2.12+0.16.04","2.13","2.14.2~16.04","2.15.2ubuntu1","2.16ubuntu3","2.17.1ubuntu1","2.20.1ubuntu1","2.21","2.22.2","2.22.3","2.22.6","2.23.1","2.24.1","2.25","2.26.10","2.27.5","2.28.5","2.29.4.2","2.32.3.2","2.32.9","2.33.1ubuntu2","2.34.2","2.34.2ubuntu0.1","2.37.4","2.37.4ubuntu0.1","2.38","2.39.2","2.39.2ubuntu0.2","2.40","2.42.1","2.45.1","2.45.1ubuntu0.2","2.46.1","2.47.1","2.48","2.48.3"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"snapd","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.54.3+18.04"}]}],"versions":["2.28.5+17.10","2.29.4.1+18.04","2.29.4.2+18.04","2.31.1+18.04","2.32+18.04~pre5","2.32+18.04~pre6","2.32+18.04","2.32.3.2+18.04","2.32.5+18.04","2.32.8+18.04","2.32.9+18.04","2.33.1+18.04ubuntu2","2.34.2+18.04","2.34.2+18.04.1","2.37.1+18.04","2.37.1.1+18.04","2.37.4+18.04","2.37.4+18.04.1","2.38+18.04","2.39.2+18.04","2.40+18.04","2.42.1+18.04","2.45.1+18.04","2.45.1+18.04.2","2.46.1+18.04","2.47.1+18.04","2.48+18.04","2.48.3+18.04","2.49.2+18.04","2.51.1+18.04","2.54.2+18.04ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"snapd","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.54.3+20.04.1"}]}],"versions":["2.41+19.10.1","2.42.1+20.04","2.43.3+git1.8109f8","2.44~pre1+20.04","2.44+20.04","2.44.2+20.04","2.44.3+20.04","2.45.1+20.04","2.45.1+20.04.2","2.46.1+20.04","2.47.1+20.04","2.48+20.04","2.48.3+20.04","2.49.2+20.04","2.51.1+20.04ubuntu2","2.54.2+20.04ubuntu2","2.54.3+20.04"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"snapd","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.54.3+18.04"}]}],"versions":["2.28.5+17.10","2.29.4.1+18.04","2.29.4.2+18.04","2.31.1+18.04","2.32+18.04~pre5","2.32+18.04~pre6","2.32+18.04","2.32.3.2+18.04","2.32.5+18.04","2.32.8+18.04","2.32.9+18.04","2.33.1+18.04ubuntu2","2.34.2+18.04","2.34.2+18.04.1","2.37.1+18.04","2.37.1.1+18.04","2.37.4+18.04","2.37.4+18.04.1","2.38+18.04","2.39.2+18.04","2.40+18.04","2.42.1+18.04","2.45.1+18.04","2.45.1+18.04.2","2.46.1+18.04","2.47.1+18.04","2.48+18.04","2.48.3+18.04","2.49.2+18.04","2.51.1+18.04","2.54.2+18.04ubuntu1"],"bundled":4},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"snapd","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.54.3+20.04"}]}],"versions":["2.41+19.10.1","2.42.1+20.04","2.43.3+git1.8109f8","2.44~pre1+20.04","2.44+20.04","2.44.2+20.04","2.44.3+20.04","2.45.1+20.04","2.45.1+20.04.2","2.46.1+20.04","2.47.1+20.04","2.48+20.04","2.48.3+20.04","2.49.2+20.04","2.51.1+20.04ubuntu2","2.54.2+20.04ubuntu2"],"bundled":4},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"snapd","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.54.3+20.04.1"}]}],"versions":["2.41+19.10.1","2.42.1+20.04","2.43.3+git1.8109f8","2.44~pre1+20.04","2.44+20.04","2.44.2+20.04","2.44.3+20.04","2.45.1+20.04","2.45.1+20.04.2","2.46.1+20.04","2.47.1+20.04","2.48+20.04","2.48.3+20.04","2.49.2+20.04","2.51.1+20.04ubuntu2","2.54.2+20.04ubuntu2","2.54.3+20.04"],"bundled":4},{"source":"osv","ecosystem":"Ubuntu:Pro:14.04:LTS","package":"snapd","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.54.3+14.04~esm1"}]}],"versions":["2.21~14.04.2","2.22.2~14.04","2.22.3~14.04","2.22.6~14.04","2.23.1~14.04","2.24.1~14.04","2.25~14.04","2.26.10~14.04","2.27.5~14.04","2.28.5~14.04","2.29.4.2~14.04","2.32.3.2~14.04","2.32.9~14.04","2.33.1~14.04","2.34.2~14.04","2.34.2~14.04.1","2.37.4~14.04.1","2.38~14.04"],"bundled":4},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"snapd","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.54.3+16.04~esm2"}]}],"versions":["1.9","1.9.1.1","1.9.2","2.0","2.0.1","2.0.2","2.0.3","2.0.5","2.0.8","2.0.9","2.0.10","2.11+0.16.04","2.12+0.16.04","2.13","2.14.2~16.04","2.15.2ubuntu1","2.16ubuntu3","2.17.1ubuntu1","2.20.1ubuntu1","2.21","2.22.2","2.22.3","2.22.6","2.23.1","2.24.1","2.25","2.26.10","2.27.5","2.28.5","2.29.4.2","2.32.3.2","2.32.9","2.33.1ubuntu2","2.34.2","2.34.2ubuntu0.1","2.37.4","2.37.4ubuntu0.1","2.38","2.39.2","2.39.2ubuntu0.2","2.40","2.42.1","2.45.1","2.45.1ubuntu0.2","2.46.1","2.47.1","2.48","2.48.3"],"bundled":4}],"products":[{"vendor":"canonical","product":"snapd"},{"vendor":"canonical","product":"ubuntu_linux"},{"vendor":"canonical ltd.","product":"snapd"},{"vendor":"fedoraproject","product":"fedora"}],"references":[{"url":"https://ubuntu.com/security/notices/USN-5292-1","tags":["x_refsource_MISC","x_transferred","Patch","Vendor Advisory","fix","advisory"]},{"url":"https://bugs.launchpad.net/snapd/+bug/1949368","tags":["x_refsource_MISC","x_transferred","Exploit","Issue Tracking","Third Party Advisory","report"]},{"url":"http://www.openwall.com/lists/oss-security/2022/02/18/2","tags":["mailing-list","x_refsource_MLIST","x_transferred","Exploit","Mailing List","Third Party Advisory","evidence"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3QTBN7LLZISXIA4KU4UKDR27Q5PXDS2U/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XCGHG6LJAVJJ72TMART6A7N4Z6MSTGI7/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-4120"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3QTBN7LLZISXIA4KU4UKDR27Q5PXDS2U/"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XCGHG6LJAVJJ72TMART6A7N4Z6MSTGI7/"},{"url":"https://github.com/advisories/GHSA-hfvx-54vj-h9wq"},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-4120","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2021-4120","tags":["report"]},{"url":"https://www.openwall.com/lists/oss-security/2022/02/18/2","tags":["report"]},{"url":"https://github.com/snapcore/snapd/commit/f3f669d720ed8b0bcb73da7789843bf43b5c16cf","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-4120","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-5292-3","tags":["advisory"]},{"url":"https://ubuntu.com/security/notices/USN-5292-2","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2021-3155","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2021-44730","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2021-44731","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2021-4120","title":"snapd could be made to bypass intended access restrictions through snap content interfaces and layout paths","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","status":"published","published":"2022-02-17T22:15:21Z","modified":"2024-08-03T17:16:04.197Z","cvss":[{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T14:33:07.697752Z"}],"euvd":[{"id":"EUVD-2021-33996","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","status":"published","published":"2022-02-17T22:15:21Z","modified":"2024-08-03T17:16:04Z","cvss":[{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-03T03:25:10.888157Z"}],"ghsa":[{"id":"GHSA-hfvx-54vj-h9wq","title":"snapd 2.54.2 fails to perform sufficient validation of snap content interface and layout paths,...","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","status":"published","published":"2022-02-19T00:01:39Z","modified":"2023-02-03T05:06:23Z","cwes":["CWE-20"],"updated_at":"2026-11-02T14:53:53.812094Z"}],"nvd":[{"id":"CVE-2021-4120","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","status":"published","published":"2022-02-17T23:15:07.55Z","modified":"2026-06-17T04:19:04.03Z","cvss":[{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H","level":"high","assessor":"secondary"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"},{"version":"2.0","score":4.6,"vector":"AV:L/AC:L/Au:N/C:P/I:P/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T14:07:04.6896Z"}],"osv":[{"id":"CVE-2021-4120","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","status":"published","published":"2022-02-17T23:15:07.55Z","modified":"2026-10-24T10:30:48.651181295Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:44:21.249056Z"},{"id":"DEBIAN-CVE-2021-4120","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","status":"published","published":"2022-02-17T23:15:07.55Z","modified":"2026-10-23T18:03:38.675781656Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:45:35.521549Z"},{"id":"UBUNTU-CVE-2021-4120","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","status":"published","published":"2022-02-17T17:00:00Z","modified":"2026-02-04T04:32:25.072959Z","cvss":[{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H","level":"high"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:54:29.220315Z"},{"id":"USN-5292-1","title":"snapd vulnerabilities","description":"James Troup discovered that snap did not properly manage the permissions for\nthe snap directories. A local attacker could possibly use this issue to expose\nsensitive information. (CVE-2021-3155)\n\nIan Johnson discovered that snapd did not properly validate content interfaces\nand layout paths. A local attacker could possibly use this issue to inject\narbitrary AppArmor policy rules, resulting in a bypass of intended access\nrestrictions. (CVE-2021-4120)\n\nThe Qualys Research Team discovered that snapd did not properly validate the\nlocation of the snap-confine binary. A local attacker could possibly use this\nissue to execute other arbitrary binaries and escalate privileges.\n(CVE-2021-44730)\n\nThe Qualys Research Team discovered that a race condition existed in the snapd\nsnap-confine binary when preparing a private mount namespace for a snap. A\nlocal attacker could possibly use this issue to escalate privileges and\nexecute arbitrary code. (CVE-2021-44731)\n","status":"published","published":"2022-02-17T17:24:49Z","modified":"2026-02-10T04:42:29Z","updated_at":"2026-11-02T16:58:15.683829Z"},{"id":"USN-5292-2","title":"snapd vulnerabilities","description":"USN-5292-1 fixed vulnerabilities in snapd. This update provides the\ncorresponding update for the riscv64 architecture.\n\nOriginal advisory details:\n\n James Troup discovered that snap did not properly manage the permissions for\n the snap directories. A local attacker could possibly use this issue to expose\n sensitive information. (CVE-2021-3155)\n \n Ian Johnson discovered that snapd did not properly validate content interfaces\n and layout paths. A local attacker could possibly use this issue to inject\n arbitrary AppArmor policy rules, resulting in a bypass of intended access\n restrictions. (CVE-2021-4120)\n \n The Qualys Research Team discovered that snapd did not properly validate the\n location of the snap-confine binary. A local attacker could possibly use this\n issue to execute other arbitrary binaries and escalate privileges.\n (CVE-2021-44730)\n \n The Qualys Research Team discovered that a race condition existed in the snapd\n snap-confine binary when preparing a private mount namespace for a snap. A\n local attacker could possibly use this issue to escalate privileges and\n execute arbitrary code. (CVE-2021-44731)\n","status":"published","published":"2022-02-18T01:07:38Z","modified":"2026-02-10T04:42:29Z","updated_at":"2026-11-02T16:58:15.683829Z"},{"id":"USN-5292-3","title":"snapd vulnerabilities","description":"USN-5292-1 fixed several vulnerabilities in snapd. This update provides the\ncorresponding update for Ubuntu 14.04 ESM and Ubuntu 16.04 ESM.\n\nOriginal advisory details:\n\n James Troup discovered that snap did not properly manage the permissions for\n the snap directories. A local attacker could possibly use this issue to expose\n sensitive information. (CVE-2021-3155)\n \n Ian Johnson discovered that snapd did not properly validate content interfaces\n and layout paths. A local attacker could possibly use this issue to inject\n arbitrary AppArmor policy rules, resulting in a bypass of intended access\n restrictions. (CVE-2021-4120)\n \n The Qualys Research Team discovered that snapd did not properly validate the\n location of the snap-confine binary. A local attacker could possibly use this\n issue to execute other arbitrary binaries and escalate privileges.\n (CVE-2021-44730)\n \n The Qualys Research Team discovered that a race condition existed in the snapd\n snap-confine binary when preparing a private mount namespace for a snap. A\n local attacker could possibly use this issue to escalate privileges and\n execute arbitrary code. (CVE-2021-44731)\n","status":"published","published":"2022-02-18T02:21:20Z","modified":"2026-06-29T13:49:35.695684972Z","updated_at":"2026-11-02T16:58:15.683829Z"}]}}
