Skip to main content

pam-MySQL CVE-2026-124749

CRITICAL
2026-11-19
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify host authenticating via pam-mysql
  2. Delivery
    Connect to default sshd (PermitEmptyPasswords no)
  3. Exploit
    Target account with NULL or empty stored password
  4. Execution
    Submit any password, comparison bypassed
  5. Impact
    Authenticate with that account's full privileges

Vulnerability Assessment

Exploitation Conditions

Requires the target host to use pam-mysql for PAM authentication through an application that sets PAM_DISALLOW_NULL_AUTHTOK - stock OpenSSH does this exactly when PermitEmptyPasswords is no, which is the default, so the default/safe configuration is the vulnerable one. It also requires at least one account in the authentication table with a credential-less stored password: SQL NULL on both 0.8.x and the 1.0 line, or an empty string '' additionally on the 1.0 betas (where a NOT NULL DEFAULT '' column, e.g. PostfixAdmin/Froxlor schemas, is exploitable). No valid credentials are needed and any or no password is accepted on that branch. Limiting factors: an exploitable row must actually exist; on 0.8.x a NOT NULL / no-empty-default schema blocks it, so exploitability there depends on the deployed schema; and the counterintuitive workaround of setting PermitEmptyPasswords yes is unsafe because it clears the flag but opens OpenSSH's own empty-password path, trading one bypass for another. The advisory states the supportable mitigation is to purge credential-less rows from authentication tables and add NOT NULL with no empty-string default.

Impact

This is a genuine high-severity pre-authentication bypass, not a paper tiger, but the headline number should be read with care. The input carries no NVD CVSS (CVSS Score and Vector are N/A); the 9.8 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) is the reporter's own assessment from the oss-security advisory, who explicitly offers an alternative 8.1 reading that prices the schema precondition into AC for the 0.8.x branch. The mechanism is strong: on a stock sshd (PermitEmptyPasswords no, the default) the inverted PAM_DISALLOW_NULL_AUTHTOK sends the safe configuration down the permissive path, so an unauthenticated network client logs in as any account whose stored password is SQL NULL using any password, with no comparison performed. The real-risk signals are mixed and incomplete: no EPSS score is provided, the CVE is not in CISA KEV, and no public exploit code is identified - the single reference is an advisory, not a PoC. The vuln.today Decision label is 'awaiting_data', consistent with that thin signal set, so this is a priority to patch but the decision framework has not yet escalated it. The practical severity hinges on branch and schema, which the advisory documents clearly: on 0.8.x only a nullable column holding NULL is exploitable (NOT NULL DEFAULT '' protects the operator), whereas on the 1.0.0 betas an empty stored password is also exploitable, so the NOT NULL DEFAULT '' schema that careful authors write (PostfixAdmin, Froxlor cited) becomes the exploitable one and AC:L / 9.8 is unambiguous there. Net: treat as high priority where pam-mysql backs sshd, but recognize the 9.8 is reporter-assigned and schema-dependent on 0.8.x, and that exploitation probability data (EPSS, KEV) is simply absent rather than reassuring.

Exploit ScenarioDerived

An unauthenticated attacker opens an SSH session to a host whose PAM stack uses pam-mysql and whose sshd runs the default PermitEmptyPasswords no. For any account whose stored password column is SQL NULL (0.8.x and 1.0) or an empty string (1.0 line only), the attacker supplies any password - or none - and is authenticated, because the password comparison is skipped entirely on that branch. No public exploit code is identified, but the advisory documents the exact code paths and a measured sshd test matrix confirming the bypass.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
No patch listed yet

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 19, 2026

pam-MySQL (libpam-mysql, src:pam-mysql) inverts the PAM_DISALLOW_NULL_AUTHTOK flag at both pam_sm_authenticate call sites, so any PAM-aware application that asks the module to refuse password-less accounts instead gets the permissive branch, and an attacker can log in as any account whose stored password is SQL NULL using any password at all - the supplied password is never compared on that branch. Because stock OpenSSH sets that flag exactly when PermitEmptyPasswords is no (the default), the safe default configuration is the one that reaches the vulnerable path; combined with the CVSS:3.1/AV:N/AC:L/PR:N/UI:N/C:H/I:H/A:H (9.8) vector this is a pre-authentication bypass requiring no credentials. Every released version carries the defect, including the 0.8.x line shipped by Debian, Ubuntu, Devuan, PureOS, Pardus, Deepin, Kali, FreeBSD, Gentoo and Liguros, and the 1.0.0 betas shipped by Fedora, Nix, Mageia, Rosa and ALT - where the guard also routes an empty stored password into the same inverted branch, making the common NOT NULL DEFAULT '' schemas (PostfixAdmin, Froxlor) exploitable too. The advisory documents working reproduction against a real sshd across three build variants; no public exploit tooling is referenced, and no KEV or EPSS signal was supplied, but the module-level assessment is a genuine high-severity bypass whose reachability depends on whether a credential-less row actually exists in the authentication table.

RemediationAI

Apply Ferenc Wagner's fix rather than a polarity-only patch: change vresult = null_inhibited; to vresult = !ctx->nullok || null_inhibited;, correct the polarity at both pam_sm_authenticate call sites from !(flags & PAM_DISALLOW_NULL_AUTHTOK) to !!(flags & PAM_DISALLOW_NULL_AUTHTOK), and add a nullok boolean defaulting to off, registered in both the module-argument and config-file option tables so operators who genuinely need permissive behaviour can request it with the same option name pam_unix and pam_ldap already use. The reason polarity correction alone is insufficient is that before the fix an application calling with flags=0 does not authenticate a NULL-password account, and fixing only the inversion would start doing so in a stable security update; released patched versions are not identified in the available data, so downstream packages carrying 0.8.x or the 1.0.0 betas should be treated as unfixed until their maintainers ship this change (for the 1.0 line the polarity correction is the same two characters at src/authenticate.c:287 and :378, with no empty-string hunk, since the guard already sends both cases to one branch). Do not use PermitEmptyPasswords yes as a workaround: it does suppress the defect by clearing the flag, but it also disables OpenSSH's own empty-password guard at auth-passwd.c:93-94, trading one bypass for another. The supportable mitigation is to purge credential-less rows from every table used for authentication and then add NOT NULL with no empty-string default; note that this schema change removes the ability, relied on by some operators knowingly or not, to have the inverted behaviour refuse NULL rows through an application that does not set the flag. On 0.8.x, any patch containing the empty-string hunk must land all three hunks together, because applying the empty-string hunk without the polarity hunks would make NOT NULL DEFAULT '' columns exploitable exactly as the 1.0 line already is. See https://seclists.org/oss-sec/2026/q4/788 for the full write-up and measured before/after matrices.

Affected ProductsAI

Every released pam-MySQL version carries the inversion, including the newest upstream commit dated 2024-03-14. The 0.8.x line (reference v0.8.2) is packaged as libpam-mysql/src:pam-mysql in Debian 11, 12, 13, 14 and sid, Ubuntu 18.04, 20.04 and 22.04, Devuan, PureOS, Pardus, Deepin, Kali, FreeBSD, Gentoo and Liguros; on these, exploitability requires a nullable password column, since a NOT NULL / no-empty-default schema blocks the NULL branch. The 1.0.0 beta line (beta1 in Fedora 39-44 and rawhide, Mageia 10 and Rosa, ALT 1.0.0; beta2 in Nix across six channels) is worse: the 'if (row[0] && row0len)' guard at src/authenticate.c:104 also sends an empty stored password down the same inverted branch, so the NOT NULL DEFAULT '' schema used by PostfixAdmin (mailbox.password, admin.password varchar(255) NOT NULL default '') and the NOT NULL schema used by Froxlor (ftp_users.password) are exploitable on that line. No CPE strings were included in the supplied data; the affected scope is stated in the oss-security posting at https://seclists.org/oss-sec/2026/q4/788.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

pam-MySQL is a PAM service module that authenticates users against a MySQL/MariaDB table, and it implements the standard PAM contract in which the calling application passes flags to pam_sm_authenticate. One of those flags, PAM_DISALLOW_NULL_AUTHTOK, means 'refuse accounts with a null/empty authentication token'; the module documents parameter 4 of its internal helper (pam_mysql.c:3611) in exactly those terms. The defect is a polarity inversion: pam_mysql.c:4708 and :4799 pass !(flags & PAM_DISALLOW_NULL_AUTHTOK) into the helper - which evaluates to 0 precisely when the application set the flag - and the else branch at :3874 assigns vresult = null_inhibited, with :3877 treating a zero result as PAM_MYSQL_ERR_SUCCESS. The password comparison itself is nested inside 'if (row[0] != NULL)' at :3689, so on the NULL branch no comparison is executed at all. The sibling pam_sm_chauthtok call sites pass a literal 0 and behave correctly, which is what marks this as an accidental inversion rather than an intended convention. On the 1.0 line the equivalent guard is 'if (row[0] && row0len)' at src/authenticate.c:104, which routes an empty (not just NULL) stored password into the same inverted branch at :127, and the polarity correction lives at src/authenticate.c:287 and :378. No CWE was assigned in the supplied data; the root-cause class is a logic/polarity error in security-decision logic rather than a memory-safety or injection flaw, and the deployed schema (nullable vs NOT NULL password column) is a genuine exploitability precondition on 0.8.x but largely disappears on the 1.0 betas.

Know when SSH gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

vuln.today AI 9.8 CRITICAL

Unauthenticated remote login via default sshd where any password accepts a NULL/empty-password row gives AV:N/AC:L/PR:N/UI:N; successful account login yields full compromise (C/I/A:H); AC:H/8.1 is defensible only on schema-constrained 0.8.x.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Estimated by vuln.today — no official severity rating has been published for this CVE yet.

Description PRE-NVD

Disclosed via oss-security. NVD scoring and full description are pending.

Executive ViewAI

Why It Matters

CVE-2026-124749 in pam-MySQL (libpam-mysql) allows unauthenticated attackers to bypass authentication and log in as any account with a NULL stored password, affecting all released versions. This critical flaw impacts organizations using PAM-aware services like OpenSSH with default configurations on Debian, Ubuntu, FreeBSD, and other popular distributions, potentially granting full system access. Leadership should prioritize immediate mitigation due to the severe risk of unauthorized access to sensitive systems.

Business Impact: Severe
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: Disable pam-MySQL authentication on affected systems by replacing it with alternative PAM modules (e.g., pam_unix) or enforcing strict account management to prevent NULL passwords; restrict network access to services using pam-MySQL (e.g., SSH) through firewall rules; implement monitoring for anomalous login attempts, especially successful logins for accounts with empty passwords; and consider using multi-factor authentication for all remote access.

Threat Intelligence Overview

Prevalence
Low
niche PAM auth module for specific mail/FTP/hosting stacks; widely packaged but narrowly deployed
Data Quality
1 sources
Confidence: Low

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS N/A
Patch available No
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

More in SSH

View all
CVE-2014-6271 CRITICAL POC
9.8 Sep 24

GNU Bash through 4.3 processes trailing strings after function definitions in the values of environment variables, which

CVE-2014-6278 HIGH POC
8.8 Sep 30

GNU Bash through 4.3 bash43-026 does not properly parse function definitions in the values of environment variables, whi

CVE-2014-7169 CRITICAL POC
9.8 Sep 25

GNU Bash through 4.3 bash43-025 processes trailing strings after certain malformed function definitions in the values of

CVE-2012-6066 CRITICAL POC
9.3 Dec 04

freeSSHd.exe in freeSSHd through 1.2.6 allows remote attackers to bypass authentication via a crafted session, as demons

CVE-2014-6277 CRITICAL POC
10.0 Sep 27

GNU Bash through 4.3 bash43-026 does not properly parse function definitions in the values of environment variables, whi

CVE-2026-123158 HIGH POC
8.1 Nov 05

Password authentication bypass in OpenSSH sshd before 10.6p2 built against musl libc without PAM lets a remote, unauthen

CVE-2023-38408 CRITICAL POC
9.8 Jul 20

The PKCS#11 feature in ssh-agent in OpenSSH before 9.3p2 has an insufficiently trustworthy search path, leading to remot

CVE-2023-25136 MEDIUM POC
6.5 Feb 03

OpenSSH server (sshd) 9.1 introduced a double-free vulnerability during options.kex_algorithms handling. Rated medium se

CVE-2016-6210 MEDIUM POC
5.9 Feb 13

sshd in OpenSSH before 7.3, when SHA256 or SHA512 are used for user password hashing, uses BLOWFISH hashing on a static

CVE-2015-5600 HIGH POC
8.1 Aug 03

The kbdint_next_device function in auth2-chall.c in sshd in OpenSSH through 6.9 does not properly restrict the processin

CVE-2016-6515 HIGH POC
7.5 Aug 07

The auth_password function in auth-passwd.c in sshd in OpenSSH before 7.3 does not limit password lengths for password a

CVE-2024-6387 HIGH POC
8.1 Jul 01

Remote code execution in OpenSSH's sshd server (regression of CVE-2006-5051) allows unauthenticated remote attackers to

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy