A single flipped flag in pam-mysql, the PAM plug-in that checks logins against a MySQL table, can let anyone log in as an account whose password is NULL in the database, with any password, or none. It’s tracked as CVE-2026-124749 and the reporter rates it CVSS 9.8.
It only bites when three things line up, and the fix is mostly in your data. Here’s the bug, who is really at risk, how to check, and the fix the researcher recommends.
Watch the video
The bug explained, the three conditions, and a real Ubuntu 26.04 test server: check the version, PAM, sshd and the database, then fix the data.
What is the bug?
When you log in over SSH, sshd tells PAM “never accept empty passwords” with a flag called PAM_DISALLOW_NULL_AUTHTOK. pam-mysql reads that flag the wrong way round, so the strict setting takes the permissive path.
The second half: on that permissive path, the code only compares passwords when the stored one is not empty. If an account’s password in the table is NULL, there’s no comparison at all. Any password works, even none.
Am I at risk?
Only if all three are true:
- pam-mysql is in a login path (sshd, mail, FTP…).
- An account has a NULL password in that table (on the 1.0 beta line an empty one counts too).
- The app sets the “disallow null” flag.
sshddoes by default (PermitEmptyPasswords no).
Check your server (read-only)
What I ran on the test VM:
dpkg-query -W libpam-mysql
apt changelog libpam-mysql | grep -c CVE-2026-124749 # 0 = no fix in your package yet
grep -l pam_mysql /etc/pam.d/* # which services use it
sudo sshd -T | grep permitemptypasswords
And in the database (table and column names will differ on your system):
SELECT username, (password IS NULL OR password = '') AS no_password FROM users;
The fix: fix the data
The researcher’s recommended fix is to make sure no account can have an empty password. On my demo table:
UPDATE users SET password='!' WHERE password IS NULL OR password='';
ALTER TABLE users MODIFY password VARCHAR(255) NOT NULL;
! never matches a real password, so those accounts are locked, and NOT NULL stops new empty passwords. Back up your database first. And do not set PermitEmptyPasswords yes: it only moves the hole.
Where the fix stands (20 Nov 2026)
- Upstream (1.0 line): fixed on 19 Nov, with a new
nullokoption (off by default). No tagged release yet. - Debian 13 trixie: 0.8.2-2.1 security upload. Debian 12 bookworm: not yet.
- Ubuntu 26.04 (libpam-mysql 0.8.2-3): no fix in the changelog yet.
- Fedora, Mageia and other 1.0-beta distros: no fixed release yet.
Check your distro’s security tracker for the current status.
Were you already hit?
Look for successful logins to accounts that have no password in the table, and review what those sessions did.
Everything shown was run in a throwaway test VM. No attack is shown or run. Understand each command, back up your database, try changes on staging first, and use them at your own risk.
Summary
- The bug: an inverted flag plus a skipped comparison: NULL-password accounts accept any password.
- At risk: pam-mysql in a login path + a NULL (or empty) password row + the disallow-null flag.
- Fix: lock empty passwords with
!, make the columnNOT NULL, and update the package when your distro ships it.
More on login bugs: sshhole: the OpenSSH bug that logs into Alpine without a password
Sources: oss-sec advisory by Andrey Vasilevsky (19 Nov 2026) · CVE-2026-124749 (assigned by Red Hat)
More on YouTube
Prefer watching? The full pam-mysql walkthrough is on our YouTube channel: watch the video. For more hands-on breakdowns of security bugs, Linux servers and dev tools, subscribe at youtube.com/@fineshotai.
