CVE-2026-124749 (CVSS 9.8): pam-mysql inverts PAM_DISALLOW_NULL_AUTHTOK at both authenticate call sites. On a stock sshd, an unauthenticated client can log in as any account whose stored password is SQL NULL, using any password.
- The defect, against v0.8.2: pam_mysql.c passes !(flags & PAM_DISALLOW_NULL_AUTHTOK) at :4708 and :4799, which is 0 exactly when the application set the flag. On the null branch (:3874 sets vresult = null_inhibited, :3877 returns success when vresult is 0), the password comparison is nested inside if (row[0] != NULL) at :3689 and never runs. The two pam_sm_chauthtok call sites pass a literal 0 and are correct. The report does not address in-the-wild exploitation; it describes an end-to-end reproduction over a real sshd on Debian trixie.
- Why a default sshd is the vector: OpenSSH sets the flag precisely when PermitEmptyPasswords is no, which is the default. The safe config reaches the permissive path. Setting PermitEmptyPasswords yes suppresses the bug but disables OpenSSH's own guard at auth-passwd.c:93-94, which opens the empty-stored-password case. It trades one bypass for another.
- Scope: every released version, including the newest upstream commit from 2024-03-14. The 0.8.x line covers Debian 11/12/13/14/sid, Ubuntu 18.04/20.04/22.04, Devuan, Kali, FreeBSD, Gentoo and others. The 1.0 betas cover Fedora 39-44 and rawhide, Nix, Mageia 10, Rosa and ALT. On 0.8.x the exploitable schema is a nullable password column. On the 1.0 line an empty stored password is also exploitable (src/authenticate.c:104 and :127), so NOT NULL DEFAULT '' schemas flip from protective to exploitable. The report cites PostfixAdmin (mailbox.password, admin.password) and Froxlor (ftp_users.password) as shipped schemas.
- Did it happen to you? OpenSSH cannot tell a bypass from a real login. "Accepted password for nullpw" and "Accepted password for normalpw" look identical. The discriminator is the database: any accepted password login for an account whose stored password was NULL or empty is necessarily a bypass. Run SELECT username FROM users WHERE password IS NULL OR password=''; and correlate those names against "Accepted password for" lines in the auth log. Current table state proves nothing about the past, so use the binary log or a backup from the period.
- pam_mysql's own audit table is a trap. log.enabled defaults to 0 (pam_mysql.c:2897, gated at :4331), so default deployments recorded nothing. When enabled, the failure string is misspelled AUTHENTICATION FALURE, so grepping FAILURE returns nothing. A weak secondary signal: the bypass leaves one SUCCESS (FIRST_PASS) row with no preceding failure.
- Fix status: upstream master has commits 6e2c52eb (the !! polarity correction) and 46175520 (a nullok option, default off, giving vresult = !ctx->nullok || null_inhibited). Debian trixie's security upload went to security-master on 2026-11-17. Bookworm goes through LTS and is not uploaded yet, so it is still exposed. The upstream v0.8.x branch is not updated, and the 1.0 line has no fixed tag (newest is 1.0.0-beta3). The reporter did not check the other distributions.
Takeaway: apply the shipping fix, but the real remediation is the rows, not the flag. Purge credential-less rows from every table used for authentication, then add NOT NULL with no empty-string default. Then run the credential-less-rows query against historical data and your sshd auth logs to look for past bypass logins. Preserve binary logs and backups from before any cleanup.