CVE-2024-5300 Missing authorization in Ubuntu 16.04 LTS

Medium 5.6 Published Updated

Malicious snaps can bypass sandbox restrictions to read system password hashes via systemd-userdbd if the service is installed.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2024-5300?

CVE-2024-5300 is a medium-severity missing authorization vulnerability in Canonical Ubuntu 16.04 LTS, published on 21 Jul 2026. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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.

Weakness: CWE-212

Which versions are affected by CVE-2024-5300?

Linux distribution packages (21)
systemd Red Hat:hummingbird:1All versions0:261-2.hum1
systemd-boot-unsigned Red Hat:hummingbird:1All versions0:261-2.hum1
systemd-container Red Hat:hummingbird:1All versions0:261-2.hum1
systemd-devel Red Hat:hummingbird:1All versions0:261-2.hum1
systemd-journal-remote Red Hat:hummingbird:1All versions0:261-2.hum1
systemd-libs Red Hat:hummingbird:1All versions0:261-2.hum1
systemd-networkd Red Hat:hummingbird:1All versions0:261-2.hum1
systemd-networkd-defaults Red Hat:hummingbird:1All versions0:261-2.hum1
systemd-oomd-defaults Red Hat:hummingbird:1All versions0:261-2.hum1
systemd-pam Red Hat:hummingbird:1All versions0:261-2.hum1
systemd-resolved Red Hat:hummingbird:1All versions0:261-2.hum1
systemd-rpm-macros Red Hat:hummingbird:1All versions0:261-2.hum1
systemd-shared Red Hat:hummingbird:1All versions0:261-2.hum1
systemd-standalone-repart Red Hat:hummingbird:1All versions0:261-2.hum1
systemd-standalone-shutdown Red Hat:hummingbird:1All versions0:261-2.hum1
systemd-standalone-sysusers Red Hat:hummingbird:1All versions0:261-2.hum1
systemd-standalone-tmpfiles Red Hat:hummingbird:1All versions0:261-2.hum1
systemd-sysusers Red Hat:hummingbird:1All versions0:261-2.hum1
systemd-tests Red Hat:hummingbird:1All versions0:261-2.hum1
systemd-udev Red Hat:hummingbird:1All versions0:261-2.hum1
systemd-ukify Red Hat:hummingbird:1All versions0:261-2.hum1

How do I fix CVE-2024-5300?

Apply the vendor's patch.

Upgrade, and check permissions on every request on the server, not only in the interface. More about Missing authorization.

Is CVE-2024-5300 being exploited?

There is no known exploitation of CVE-2024-5300 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2024-5300, GHSA-px3v-8ppp-543h, RHSA-2026:29009, UBUNTU-CVE-2024-5300.

Is CVE-2024-5300 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free