CVE-2024-5300: CWE-212 Improper removal of sensitive information before storage or transfer
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.
AI Analysis
Technical Summary
The vulnerability arises from the AppArmor profile abstraction rules in /etc/apparmor.d/abstractions/nss-systemd, which inadvertently permit strictly confined snap applications without privileged account-control interface access to interact with systemd UNIX domain sockets. On systems with systemd-userdbd installed and running, the service returns complete user records including sensitive hashed passwords when queried by a root process inside a snap sandbox. This leads to an access control bypass and disclosure of sensitive information (hashed passwords) from /etc/shadow. The issue affects snapd versions before 2.76.1. There is no official remediation level or patch explicitly stated in the advisory, and no known exploits in the wild have been reported.
Potential Impact
An attacker who can execute code as root within a strictly confined snap application can bypass sandbox restrictions to query systemd-userdbd and obtain hashed user passwords from /etc/shadow. This compromises the confidentiality of sensitive authentication data. The vulnerability requires local access with some privileges and presence of systemd-userdbd service, which is not installed by default on standard Ubuntu systems, reducing the attack surface.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since systemd-userdbd is not installed by default, systems without this service are not affected. Restrict installation and operation of systemd-userdbd where possible. Monitor vendor communications for updates or patches addressing this vulnerability.
CVE-2024-5300: CWE-212 Improper removal of sensitive information before storage or transfer
Description
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.
CVSS v3.1
Score 5.6medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability arises from the AppArmor profile abstraction rules in /etc/apparmor.d/abstractions/nss-systemd, which inadvertently permit strictly confined snap applications without privileged account-control interface access to interact with systemd UNIX domain sockets. On systems with systemd-userdbd installed and running, the service returns complete user records including sensitive hashed passwords when queried by a root process inside a snap sandbox. This leads to an access control bypass and disclosure of sensitive information (hashed passwords) from /etc/shadow. The issue affects snapd versions before 2.76.1. There is no official remediation level or patch explicitly stated in the advisory, and no known exploits in the wild have been reported.
Potential Impact
An attacker who can execute code as root within a strictly confined snap application can bypass sandbox restrictions to query systemd-userdbd and obtain hashed user passwords from /etc/shadow. This compromises the confidentiality of sensitive authentication data. The vulnerability requires local access with some privileges and presence of systemd-userdbd service, which is not installed by default on standard Ubuntu systems, reducing the attack surface.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since systemd-userdbd is not installed by default, systems without this service are not affected. Restrict installation and operation of systemd-userdbd where possible. Monitor vendor communications for updates or patches addressing this vulnerability.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- canonical
- Date Reserved
- 2024-05-23T21:58:22.809Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a5f856d2a4a8d5989472584
Added to database: 07/21/2026, 14:42:53 UTC
Last enriched: 07/21/2026, 14:58:52 UTC
Last updated: 07/21/2026, 22:51:54 UTC
Views: 6
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.