Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-4120

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

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-4120
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 07:06 UTC · Revision 1

Source evidence

CVE-2021-4120

core-osv · Original source

Published 17 Feb 2022, 23:15 UTC

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

osv:CVE-2021-4120
Complete source record
{
  "id": "26213ede561a07d8264659b05fbb702318c1c3b90c6a9f33733e829ac5d5e041",
  "url": "https://osv.dev/vulnerability/CVE-2021-4120",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-4120",
    "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",
    "evidence": "osv:CVE-2021-4120",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2021-4120",
      "aliases": [
        "CVE-2021-4120"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/canonical/snapd",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "last_affected": "f6ff602cae4755eb38d1bbb20fa15752cb3b763a"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:canonical:snapd:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "last_affected": "2.54.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "2.54.2",
            "2.54.1",
            "2.54",
            "untagged-ec50ee5bfb45daefc236",
            "2.15.2",
            "2.15",
            "2.14.2.16.04",
            "2.14.1",
            "2.14",
            "2.13",
            "2.12",
            "2.11",
            "2.0.10",
            "2.0.9",
            "2.0.8",
            "2.0.7",
            "2.0.6",
            "2.0.5",
            "2.0.4",
            "2.0.3",
            "2.0",
            "1.9.4",
            "1.9.3",
            "1.9.2",
            "1.9.1",
            "1.9",
            "ppa",
            "1.7.3+20160310ubuntu1",
            "1.7.3+20160308ubuntu1",
            "1.7.3+20160303ubuntu4",
            "1.7.3+20160303ubuntu3",
            "1.7.3+20160303ubuntu2",
            "1.7.3+20160303ubuntu1",
            "1.7.3+20160225ubuntu1",
            "1.7.2+20160223ubuntu1",
            "1.7.2+20160204ubuntu1",
            "1.7.2+20160113ubuntu1",
            "1.7.2ubuntu1",
            "1.7ubuntu1",
            "1.6ubuntu1",
            "1.5ubuntu1",
            "1.4ubuntu1",
            "1.3ubuntu1",
            "1.2-0ubuntu1",
            "1.1.2-0ubuntu1",
            "1.1.1-0ubuntu1",
            "1.1-0ubuntu1",
            "1.0.1-0ubuntu1",
            "1.0-0ubuntu1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-4120.json"
          }
        }
      ],
      "modified": "2026-10-24T10:30:48.651181295Z",
      "provider": "osv",
      "references": [
        "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3QTBN7LLZISXIA4KU4UKDR27Q5PXDS2U/",
        "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XCGHG6LJAVJJ72TMART6A7N4Z6MSTGI7/",
        "https://bugs.launchpad.net/snapd/+bug/1949368",
        "https://ubuntu.com/security/notices/USN-5292-1"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*",
              "cpe:2.3:o:canonical:ubuntu_linux:20.04:*:*:*:lts:*:*:*",
              "cpe:2.3:o:canonical:ubuntu_linux:21.10:*:*:*:*:*:*:*"
            ],
            "vendor_product": "canonical:ubuntu_linux",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "18.04"
                  },
                  {
                    "last_affected": "18.04"
                  },
                  {
                    "introduced": "20.04"
                  },
                  {
                    "last_affected": "20.04"
                  },
                  {
                    "introduced": "21.10"
                  },
                  {
                    "last_affected": "21.10"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*",
              "cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*"
            ],
            "vendor_product": "fedoraproject:fedora",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "34"
                  },
                  {
                    "last_affected": "34"
                  },
                  {
                    "introduced": "35"
                  },
                  {
                    "last_affected": "35"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2021-4120",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 436814,
  "published_at": "2022-02-17T23:15:07.55+00:00"
}