pam-mysql inverted PAM_DISALLOW_NULL_AUTHTOK — pre-auth SSH auth bypass for NULL/empty password rows (CVE-2026-124749)
Severity: critical · Patch status: patched · Since 2026-11-19 · CVE-2026-124749
pam-mysql inverts the PAMDISALLOWNULLAUTHTOK flag at both pamsmauthenticate call sites, so applications requesting refusal of null auth tokens get the permissive behaviour instead. On a stock OpenSSH (PermitEmptyPasswords no, the default), an unauthenticated network client can authenticate as any account whose stored password column is SQL NULL (0.8.x) or empty string (1.0.x) using any password; no comparison occurs. Every released version is affected, including 1.0.0 betas where NOT NULL DEFAULT '' schemas (e.g. PostfixAdmin, Froxlor) are exploitable. A shipping fix by Ferenc Wagner corrects polarity and adds a default-off nullok option. No in-the-wild exploitation reported; OpenSSH logs cannot distinguish bypass logins from legitimate ones.
What to do
- Purge credential-less rows (NULL or empty password) from any MySQL tables used for authentication, then enforce NOT NULL with no empty-string default
- Upgrade pam-mysql to a version with the polarity fix plus nullok option once available in your distribution
- Do NOT set PermitEmptyPasswords yes as a workaround — it trades one bypass for another
- Audit SSH auth logs for unexpected successful logins to accounts with NULL/empty stored passwords (indistinguishable from legitimate logins, so correlate with account inventory)
- If on 1.0.x beta distros (Fedora, Nix, Mageia, ALT), treat NOT NULL DEFAULT '' password columns as exploitable, not protective
Fixed versions
- shipping fix: polarity correction (!!) plus nullok option (Ferenc Wagner's patch); not yet stated as a released version number
Sources
All live incidents on Threat Watch