Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2024-5300

MEDIUM 5.6EPSS 1%

AppArmor Base Profile Misconfiguration in snapd Permits Confined Snaps Unauthorized Access to Hashed Passwords via systemd-userdbd

Mitigation

  • Upgrade snapd to 2.76.1 or later.

Who should check

  • Anyone running snapd < 2.76.1
  • Anyone running Canonical Ubuntu 26.04 LTS all versions
  • Anyone running Canonical Ubuntu 24.04 LTS all versions
  • Anyone running Canonical Ubuntu 22.04 LTS all versions
  • Anyone running Canonical Ubuntu 20.04 LTS all versions
  • Anyone running Canonical Ubuntu 18.04 LTS all versions
  • Anyone running Canonical Ubuntu 16.04 LTS all versions

Vulnerability facts

Affected
snapd < 2.76.1; Canonical Ubuntu 26.04 LTS all versions; Canonical Ubuntu 24.04 LTS all versions; Canonical Ubuntu 22.04 LTS all versions; Canonical Ubuntu 20.04 LTS all versions; Canonical Ubuntu 18.04 LTS all versions; Canonical Ubuntu 16.04 LTS all versions
Fixed in
snapd 2.76.1
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Not remotely exploitable (local or adjacent access needed)
CVSS
5.6 (v3.1, CNA)CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Local
  • Attack complexity: High
  • Privileges required: Low
  • User interaction: None
  • Scope: Changed (impact reaches other components)
  • Confidentiality impact: High
  • Integrity impact: None
  • Availability impact: None
EPSS
0.13% chance of exploitation in 30 days (percentile 1, 2026-11-26)
CWE
CWE-212
Published
Modified

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.

Affected and fixed versions

Package / productAffectedFixedSource
snapd< 2.76.1—cvelist
Canonical Ubuntu 26.04 LTSall versions—cvelist
Canonical Ubuntu 24.04 LTSall versions—cvelist
Canonical Ubuntu 22.04 LTSall versions—cvelist
Canonical Ubuntu 20.04 LTSall versions—cvelist
Canonical Ubuntu 18.04 LTSall versions—cvelist
Canonical Ubuntu 16.04 LTSall versions—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2024-5300. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-5300.md
Affected: snapd < 2.76.1; Canonical Ubuntu 26.04 LTS all versions; Canonical Ubuntu 24.04 LTS all versions; Canonical Ubuntu 22.04 LTS all versions; Canonical Ubuntu 20.04 LTS all versions; Canonical Ubuntu 18.04 LTS all versions; Canonical Ubuntu 16.04 LTS all versions
Fixed in: snapd 2.76.1

Steps:
1. Search this machine and project for snapd, Canonical Ubuntu 26.04 LTS, Canonical Ubuntu 24.04 LTS, Canonical Ubuntu 22.04 LTS, Canonical Ubuntu 20.04 LTS, Canonical Ubuntu 18.04 LTS: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2024-5300 being exploited?

There is no confirmed exploitation: CVE-2024-5300 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.13% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2024-5300?

Medium: CVSS 5.6 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.

Which versions are affected by CVE-2024-5300?

snapd < 2.76.1; Canonical Ubuntu 26.04 LTS all versions; Canonical Ubuntu 24.04 LTS all versions; Canonical Ubuntu 22.04 LTS all versions; Canonical Ubuntu 20.04 LTS all versions; Canonical Ubuntu 18.04 LTS all versions; Canonical Ubuntu 16.04 LTS all versions.

Is there a fix for CVE-2024-5300?

Yes. Fixed in snapd 2.76.1. Upgrade snapd to 2.76.1 or later.

How do I check if I'm affected by CVE-2024-5300?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors