CVE-2024-5300 (GCVE-0-2024-5300)
Vulnerability from cvelistv5
Published
2026-07-21 14:00
Modified
2026-07-22 18:28
CWE
  • CWE-212 - Improper removal of sensitive information before storage or transfer
Summary
An access control bypass and information disclosure vulnerability exists in the base AppArmor security profile configuration of Canonical snapd. The abstraction rules located in /etc/apparmor.d/abstractions/nss-systemd (inherited via ) inadvertently permit strictly confined snap applications, which lack the privileged account-control interface, to interact directly with the io.systemd.Multiplexer and io.systemd.NameServiceSwitch UNIX domain sockets under /run/systemd/userdb/. On systems where the systemd-userdbd service is installed and operational, the service fails to distinguish between an unconfined root user on the host system and a restricted root user running within a snap application's sandbox (such as a daemon or configuration hook). Because systemd-userdbd returns "complete" user records—including sensitive hashed user passwords from /etc/shadow—when queried by a process running as root, a compromised or malicious strictly confined snap executing code as root can successfully query the Varlink interface to retrieve all system password hashes, bypassing intended snap sandbox restrictions. This issue is mitigated by the fact that systemd-userdbd is not installed by default on standard Ubuntu deployments.
References
https://ubuntu.com/security/CVE-2024-5300 vdb-entry, issue-tracking
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-5300",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2026-07-22T18:13:29.966474Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2026-07-22T18:28:16.818Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "collectionURL": "https://github.com/canonical",
          "defaultStatus": "unaffected",
          "packageName": "snapd",
          "repo": "https://github.com/canonical/snapd/",
          "versions": [
            {
              "lessThan": "2.76.1",
              "status": "affected",
              "version": "0",
              "versionType": "semver"
            }
          ]
        },
        {
          "collectionURL": "https://launchpad.net/ubuntu/resolute",
          "defaultStatus": "affected",
          "packageName": "snapd",
          "platforms": [
            "Linux"
          ],
          "product": "Ubuntu 26.04 LTS",
          "repo": "https://launchpad.net/ubuntu/+source/snapd",
          "vendor": "Canonical",
          "versions": [
            {
              "status": "unaffected",
              "version": "2.76+ubuntu26.04.3",
              "versionType": "dpkg"
            }
          ]
        },
        {
          "collectionURL": "https://launchpad.net/ubuntu/noble",
          "defaultStatus": "affected",
          "packageName": "snapd",
          "platforms": [
            "Linux"
          ],
          "product": "Ubuntu 24.04 LTS",
          "repo": "https://launchpad.net/ubuntu/+source/snapd",
          "vendor": "Canonical",
          "versions": [
            {
              "status": "unaffected",
              "version": "2.76+ubuntu24.04.1",
              "versionType": "dpkg"
            }
          ]
        },
        {
          "collectionURL": "https://launchpad.net/ubuntu/jammy",
          "defaultStatus": "affected",
          "packageName": "snapd",
          "platforms": [
            "Linux"
          ],
          "product": "Ubuntu 22.04 LTS",
          "repo": "https://launchpad.net/ubuntu/+source/snapd",
          "vendor": "Canonical",
          "versions": [
            {
              "status": "unaffected",
              "version": "2.76+ubuntu22.04.1",
              "versionType": "dpkg"
            }
          ]
        },
        {
          "collectionURL": "https://launchpad.net/ubuntu/focal",
          "defaultStatus": "affected",
          "packageName": "snapd",
          "platforms": [
            "Linux"
          ],
          "product": "Ubuntu 20.04 LTS",
          "repo": "https://launchpad.net/ubuntu/+source/snapd",
          "vendor": "Canonical",
          "versions": [
            {
              "status": "unaffected",
              "version": "2.67.1+20.04ubuntu1~esm2",
              "versionType": "dpkg"
            }
          ]
        },
        {
          "collectionURL": "https://launchpad.net/ubuntu/bionic",
          "defaultStatus": "affected",
          "packageName": "snapd",
          "platforms": [
            "Linux"
          ],
          "product": "Ubuntu 18.04 LTS",
          "repo": "https://launchpad.net/ubuntu/+source/snapd",
          "vendor": "Canonical",
          "versions": [
            {
              "status": "unaffected",
              "version": "2.61.4ubuntu0.18.04.1+esm3",
              "versionType": "dpkg"
            }
          ]
        },
        {
          "collectionURL": "https://launchpad.net/ubuntu/xenial",
          "defaultStatus": "affected",
          "packageName": "snapd",
          "platforms": [
            "Linux"
          ],
          "product": "Ubuntu 16.04 LTS",
          "repo": "https://launchpad.net/ubuntu/+source/snapd",
          "vendor": "Canonical",
          "versions": [
            {
              "status": "unaffected",
              "version": "2.61.4ubuntu0.16.04.1+esm3"
            }
          ]
        }
      ],
      "credits": [
        {
          "lang": "en",
          "type": "finder",
          "value": "James Henstridge"
        }
      ],
      "datePublic": "2026-07-21T14:00:00.000Z",
      "descriptions": [
        {
          "lang": "en",
          "value": "An access control bypass and information disclosure vulnerability exists in the base AppArmor security profile configuration of Canonical snapd. The abstraction rules located in /etc/apparmor.d/abstractions/nss-systemd (inherited via ) inadvertently permit strictly confined snap applications, which lack the privileged account-control interface, to interact directly with the io.systemd.Multiplexer and io.systemd.NameServiceSwitch UNIX domain sockets under /run/systemd/userdb/.\nOn systems where the systemd-userdbd service is installed and operational, the service fails to distinguish between an unconfined root user on the host system and a restricted root user running within a snap application\u0027s sandbox (such as a daemon or configuration hook). Because systemd-userdbd returns \"complete\" user records\u2014including sensitive hashed user passwords from /etc/shadow\u2014when queried by a process running as root, a compromised or malicious strictly confined snap executing code as root can successfully query the Varlink interface to retrieve all system password hashes, bypassing intended snap sandbox restrictions. This issue is mitigated by the fact that systemd-userdbd is not installed by default on standard Ubuntu deployments."
        }
      ],
      "impacts": [
        {
          "capecId": "CAPEC-1",
          "descriptions": [
            {
              "lang": "en",
              "value": "CAPEC-1 Accessing Functionality Not Properly Constrained by ACLs"
            }
          ]
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "attackComplexity": "HIGH",
            "attackVector": "LOCAL",
            "availabilityImpact": "NONE",
            "baseScore": 5.6,
            "baseSeverity": "MEDIUM",
            "confidentialityImpact": "HIGH",
            "integrityImpact": "NONE",
            "privilegesRequired": "LOW",
            "scope": "CHANGED",
            "userInteraction": "NONE",
            "vectorString": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N",
            "version": "3.1"
          },
          "format": "CVSS",
          "scenarios": [
            {
              "lang": "en",
              "value": "GENERAL"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-212",
              "description": "CWE-212 Improper removal of sensitive information before storage or transfer",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-07-21T14:00:51.066Z",
        "orgId": "cc1ad9ee-3454-478d-9317-d3e869d708bc",
        "shortName": "canonical"
      },
      "references": [
        {
          "tags": [
            "vdb-entry",
            "issue-tracking"
          ],
          "url": "https://ubuntu.com/security/CVE-2024-5300"
        }
      ],
      "source": {
        "discovery": "INTERNAL"
      },
      "title": "AppArmor Base Profile Misconfiguration in snapd Permits Confined Snaps Unauthorized Access to Hashed Passwords via systemd-userdbd"
    }
  },
  "cveMetadata": {
    "assignerOrgId": "cc1ad9ee-3454-478d-9317-d3e869d708bc",
    "assignerShortName": "canonical",
    "cveId": "CVE-2024-5300",
    "datePublished": "2026-07-21T14:00:51.066Z",
    "dateReserved": "2024-05-23T21:58:22.809Z",
    "dateUpdated": "2026-07-22T18:28:16.818Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2024-5300\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2026-07-22T18:13:29.966474Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2026-07-22T18:13:30.782Z\"}}], \"cna\": {\"title\": \"AppArmor Base Profile Misconfiguration in snapd Permits Confined Snaps Unauthorized Access to Hashed Passwords via systemd-userdbd\", \"source\": {\"discovery\": \"INTERNAL\"}, \"credits\": [{\"lang\": \"en\", \"type\": \"finder\", \"value\": \"James Henstridge\"}], \"impacts\": [{\"capecId\": \"CAPEC-1\", \"descriptions\": [{\"lang\": \"en\", \"value\": \"CAPEC-1 Accessing Functionality Not Properly Constrained by ACLs\"}]}], \"metrics\": [{\"format\": \"CVSS\", \"cvssV3_1\": {\"scope\": \"CHANGED\", \"version\": \"3.1\", \"baseScore\": 5.6, \"attackVector\": \"LOCAL\", \"baseSeverity\": \"MEDIUM\", \"vectorString\": \"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N\", \"integrityImpact\": \"NONE\", \"userInteraction\": \"NONE\", \"attackComplexity\": \"HIGH\", \"availabilityImpact\": \"NONE\", \"privilegesRequired\": \"LOW\", \"confidentialityImpact\": \"HIGH\"}, \"scenarios\": [{\"lang\": \"en\", \"value\": \"GENERAL\"}]}], \"affected\": [{\"repo\": \"https://github.com/canonical/snapd/\", \"versions\": [{\"status\": \"affected\", \"version\": \"0\", \"lessThan\": \"2.76.1\", \"versionType\": \"semver\"}], \"packageName\": \"snapd\", \"collectionURL\": \"https://github.com/canonical\", \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://launchpad.net/ubuntu/+source/snapd\", \"vendor\": \"Canonical\", \"product\": \"Ubuntu 26.04 LTS\", \"versions\": [{\"status\": \"unaffected\", \"version\": \"2.76+ubuntu26.04.3\", \"versionType\": \"dpkg\"}], \"platforms\": [\"Linux\"], \"packageName\": \"snapd\", \"collectionURL\": \"https://launchpad.net/ubuntu/resolute\", \"defaultStatus\": \"affected\"}, {\"repo\": \"https://launchpad.net/ubuntu/+source/snapd\", \"vendor\": \"Canonical\", \"product\": \"Ubuntu 24.04 LTS\", \"versions\": [{\"status\": \"unaffected\", \"version\": \"2.76+ubuntu24.04.1\", \"versionType\": \"dpkg\"}], \"platforms\": [\"Linux\"], \"packageName\": \"snapd\", \"collectionURL\": \"https://launchpad.net/ubuntu/noble\", \"defaultStatus\": \"affected\"}, {\"repo\": \"https://launchpad.net/ubuntu/+source/snapd\", \"vendor\": \"Canonical\", \"product\": \"Ubuntu 22.04 LTS\", \"versions\": [{\"status\": \"unaffected\", \"version\": \"2.76+ubuntu22.04.1\", \"versionType\": \"dpkg\"}], \"platforms\": [\"Linux\"], \"packageName\": \"snapd\", \"collectionURL\": \"https://launchpad.net/ubuntu/jammy\", \"defaultStatus\": \"affected\"}, {\"repo\": \"https://launchpad.net/ubuntu/+source/snapd\", \"vendor\": \"Canonical\", \"product\": \"Ubuntu 20.04 LTS\", \"versions\": [{\"status\": \"unaffected\", \"version\": \"2.67.1+20.04ubuntu1~esm2\", \"versionType\": \"dpkg\"}], \"platforms\": [\"Linux\"], \"packageName\": \"snapd\", \"collectionURL\": \"https://launchpad.net/ubuntu/focal\", \"defaultStatus\": \"affected\"}, {\"repo\": \"https://launchpad.net/ubuntu/+source/snapd\", \"vendor\": \"Canonical\", \"product\": \"Ubuntu 18.04 LTS\", \"versions\": [{\"status\": \"unaffected\", \"version\": \"2.61.4ubuntu0.18.04.1+esm3\", \"versionType\": \"dpkg\"}], \"platforms\": [\"Linux\"], \"packageName\": \"snapd\", \"collectionURL\": \"https://launchpad.net/ubuntu/bionic\", \"defaultStatus\": \"affected\"}, {\"repo\": \"https://launchpad.net/ubuntu/+source/snapd\", \"vendor\": \"Canonical\", \"product\": \"Ubuntu 16.04 LTS\", \"versions\": [{\"status\": \"unaffected\", \"version\": \"2.61.4ubuntu0.16.04.1+esm3\"}], \"platforms\": [\"Linux\"], \"packageName\": \"snapd\", \"collectionURL\": \"https://launchpad.net/ubuntu/xenial\", \"defaultStatus\": \"affected\"}], \"datePublic\": \"2026-07-21T14:00:00.000Z\", \"references\": [{\"url\": \"https://ubuntu.com/security/CVE-2024-5300\", \"tags\": [\"vdb-entry\", \"issue-tracking\"]}], \"descriptions\": [{\"lang\": \"en\", \"value\": \"An access control bypass and information disclosure vulnerability exists in the base AppArmor security profile configuration of Canonical snapd. The abstraction rules located in /etc/apparmor.d/abstractions/nss-systemd (inherited via ) inadvertently permit strictly confined snap applications, which lack the privileged account-control interface, to interact directly with the io.systemd.Multiplexer and io.systemd.NameServiceSwitch UNIX domain sockets under /run/systemd/userdb/.\\nOn systems where the systemd-userdbd service is installed and operational, the service fails to distinguish between an unconfined root user on the host system and a restricted root user running within a snap application\u0027s sandbox (such as a daemon or configuration hook). Because systemd-userdbd returns \\\"complete\\\" user records\\u2014including sensitive hashed user passwords from /etc/shadow\\u2014when queried by a process running as root, a compromised or malicious strictly confined snap executing code as root can successfully query the Varlink interface to retrieve all system password hashes, bypassing intended snap sandbox restrictions. This issue is mitigated by the fact that systemd-userdbd is not installed by default on standard Ubuntu deployments.\"}], \"problemTypes\": [{\"descriptions\": [{\"lang\": \"en\", \"type\": \"CWE\", \"cweId\": \"CWE-212\", \"description\": \"CWE-212 Improper removal of sensitive information before storage or transfer\"}]}], \"providerMetadata\": {\"orgId\": \"cc1ad9ee-3454-478d-9317-d3e869d708bc\", \"shortName\": \"canonical\", \"dateUpdated\": \"2026-07-21T14:00:51.066Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2024-5300\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2026-07-22T18:28:16.818Z\", \"dateReserved\": \"2024-05-23T21:58:22.809Z\", \"assignerOrgId\": \"cc1ad9ee-3454-478d-9317-d3e869d708bc\", \"datePublished\": \"2026-07-21T14:00:51.066Z\", \"assignerShortName\": \"canonical\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…