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 exists in the AppArmor profile abstraction rules for snapd, specifically in /etc/apparmor.d/abstractions/nss-systemd, which permit strictly confined snap applications without privileged account-control interface access to interact with io.systemd.Multiplexer and io.systemd.NameServiceSwitch UNIX domain sockets under /run/systemd/userdb/. On systems with systemd-userdbd installed and running, this service fails to differentiate between unconfined root and restricted root users, returning complete user records including hashed passwords from /etc/shadow when queried via the Varlink interface. Consequently, a compromised or malicious strictly confined snap running as root can bypass sandbox restrictions to obtain sensitive password hashes. The issue is partially mitigated by the absence of systemd-userdbd in default Ubuntu installations.
Potential Impact
An attacker controlling a strictly confined snap application running as root can bypass sandbox restrictions to access sensitive hashed user passwords from /etc/shadow via systemd-userdbd's Varlink interface. This leads to information disclosure of password hashes, potentially enabling offline password cracking and further system compromise. The impact is limited to systems where systemd-userdbd is installed and operational.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Mitigation currently relies on the fact that systemd-userdbd is not installed by default on standard Ubuntu deployments. Administrators should verify whether systemd-userdbd is installed and consider removing or restricting it if not required. Monitor vendor advisories for updates or official fixes 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
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability exists in the AppArmor profile abstraction rules for snapd, specifically in /etc/apparmor.d/abstractions/nss-systemd, which permit strictly confined snap applications without privileged account-control interface access to interact with io.systemd.Multiplexer and io.systemd.NameServiceSwitch UNIX domain sockets under /run/systemd/userdb/. On systems with systemd-userdbd installed and running, this service fails to differentiate between unconfined root and restricted root users, returning complete user records including hashed passwords from /etc/shadow when queried via the Varlink interface. Consequently, a compromised or malicious strictly confined snap running as root can bypass sandbox restrictions to obtain sensitive password hashes. The issue is partially mitigated by the absence of systemd-userdbd in default Ubuntu installations.
Potential Impact
An attacker controlling a strictly confined snap application running as root can bypass sandbox restrictions to access sensitive hashed user passwords from /etc/shadow via systemd-userdbd's Varlink interface. This leads to information disclosure of password hashes, potentially enabling offline password cracking and further system compromise. The impact is limited to systems where systemd-userdbd is installed and operational.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Mitigation currently relies on the fact that systemd-userdbd is not installed by default on standard Ubuntu deployments. Administrators should verify whether systemd-userdbd is installed and consider removing or restricting it if not required. Monitor vendor advisories for updates or official fixes addressing this vulnerability.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-px3v-8ppp-543h
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2024-5300"]
- Ecosystems
- []
- Database Specific Severity
- MODERATE
- Cvss Version
- 3.1
Threat ID: 6a5fd1501010f89cc21c8bc5
Added to database: 07/21/2026, 20:06:40 UTC
Last enriched: 07/22/2026, 01:47:50 UTC
Last updated: 08/31/2026, 10:52:03 UTC
Views: 103
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.