Skip to main content
Vulnerability Database/CVE-2026-97380

CVE-2026-97380: MariaDB Authentication Bypass Vulnerability

CVE-2026-97380 is an authentication bypass flaw in MariaDB that allows low-privileged attackers to set passwords for other accounts through GRANT PROXY mishandling. This article covers technical details, affected versions, and patches.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-97380 Overview

CVE-2026-97380 is an authorization flaw in MariaDB server affecting the GRANT PROXY statement. When the statement includes an IDENTIFIED clause with an empty password, MariaDB treats the clause as if authentication were not specified. This causes the server to check the wrong grantor's privileges during authorization. A low-privileged attacker who can reference another account name can abuse this logic error to set that account's password, including high-privileged accounts. The flaw affects MariaDB versions from 10.6.1 through the fixed releases, and is tracked under [CWE-620: Unverified Password Change].

Critical Impact

An authenticated low-privileged database user can reset passwords of arbitrary accounts, including administrative accounts, leading to full database compromise.

Affected Products

  • MariaDB server 10.6.1 through 10.6.27 (fixed in 10.6.28)
  • MariaDB server 10.11.x through 10.11.18, 11.4.x through 11.4.12, 11.8.x through 11.8.8
  • MariaDB server 12.3.x through 12.3.2 and 13.0.x through 13.0.1

Discovery Timeline

  • 2026-10-16 - CVE-2026-97380 published to NVD
  • 2026-10-20 - Last updated in NVD database

Technical Details for CVE-2026-97380

Vulnerability Analysis

The vulnerability lives in the SQL parser and user structure handling for the GRANT PROXY statement. MariaDB uses a USER_AUTH structure to represent authentication parameters supplied with an IDENTIFIED clause. The server's logic to decide whether authentication was specified relied on inspecting fields inside that structure. When IDENTIFIED BY '' supplied an empty password, those fields remained zero-length, so the server concluded that no authentication clause existed. Based on that mistaken conclusion, privilege checks were routed to the wrong grantor context, allowing a caller without CREATE USER or equivalent privileges to modify the target account's credentials.

Root Cause

The root cause is an incorrect predicate in has_auth() defined in sql/structs.h. The original implementation required at least one of plugin.length, auth_str.length, or pwtext.length to be non-zero before treating authentication as present. An empty password satisfied none of these, so has_auth() returned false even when the parser had allocated a USER_AUTH object for the clause. Additionally, in sql/sql_yacc.yy, the grammar always allocated a USER_AUTH for the current_user branch, further obscuring the intent of the authentication check.

Attack Vector

Exploitation requires network access to the database and an authenticated session with low privileges. The attacker issues a GRANT PROXY statement targeting a victim account and includes an IDENTIFIED BY '' clause. Because the server mishandles the empty-password case, it uses the wrong grantor's privileges for the authorization check and permits the password of the referenced account to be set. The attacker then authenticates as the victim account, typically a privileged user, achieving full compromise of confidentiality, integrity, and availability of the database.

c
// Patch excerpt - sql/structs.h
// Source: https://github.com/MariaDB/server/commit/dbd60d0ad8daa2d01050346aa50b7b102490e456
  USER_AUTH *auth;
  bool has_auth()
  {
-    return auth && (auth->plugin.length || auth->auth_str.length || auth->pwtext.length);
+    return auth;
  }

The fix changes has_auth() to return true whenever a USER_AUTH object exists, regardless of whether the password string is empty. A corresponding change in sql/sql_yacc.yy removes the unconditional allocation of a USER_AUTH for the current_user grammar rule so that authentication presence is detected accurately.

text
// Patch excerpt - sql/sql_yacc.yy
// Source: https://github.com/MariaDB/server/commit/dbd60d0ad8daa2d01050346aa50b7b102490e456
            if (unlikely(!($$=(LEX_USER*)thd->calloc(sizeof(LEX_USER)))))
              MYSQL_YYABORT;
            $$->user= current_user;
-            $$->auth= new (thd->mem_root) USER_AUTH();
          }
        ;

Detect Identity Attacks the Moment Authentication Fails

Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.

Stop Identity Attacks

Detection Methods for CVE-2026-97380

Indicators of Compromise

  • GRANT PROXY statements executed by non-administrative accounts that include an IDENTIFIED BY '' clause.
  • Unexpected password changes in mysql.global_priv or mysql.user tables for privileged accounts.
  • Successful authentications by administrative accounts from source hosts that have never logged in before.
  • New sessions by accounts immediately following suspicious GRANT PROXY activity in the audit log.

Detection Strategies

  • Enable the MariaDB audit plugin and alert on any GRANT PROXY statement issued by a user lacking the GRANT OPTION or CREATE USER privilege.
  • Review general query logs for the regex pattern GRANT\s+PROXY.*IDENTIFIED\s+BY\s+['"]{2} indicating an empty-password clause.
  • Correlate password-change events with the account that executed them to identify grantor mismatches.

Monitoring Recommendations

  • Ingest MariaDB audit and error logs into a centralized SIEM and build a rule for GRANT PROXY activity paired with authentication changes.
  • Baseline which accounts normally issue DCL statements and alert on deviations.
  • Monitor for post-exploitation behavior such as role grants, privilege escalations, and new administrative sessions following a GRANT PROXY event.

How to Mitigate CVE-2026-97380

Immediate Actions Required

  • Upgrade MariaDB server to 10.6.28, 10.11.19, 11.4.13, 11.8.9, 12.3.3, or 13.0.2 based on the deployed branch.
  • Audit the mysql.global_priv table and recent authentication logs for unauthorized password changes on administrative accounts.
  • Rotate credentials for any account whose password may have been altered during the exposure window.

Patch Information

MariaDB fixed the issue in versions 10.6.28, 10.11.19, 11.4.13, 11.8.9, 12.3.3, and 13.0.2. The fix is tracked as MDEV-40470 and detailed in MariaDB Security Advisory GHSA-625w-4hgq-qwmr. The upstream commit is available at the MariaDB Commit Update.

Workarounds

  • Restrict the GRANT OPTION and proxy-grant capability to a small number of trusted administrative accounts only.
  • Revoke unnecessary privileges from application and reporting accounts that connect to the database.
  • Restrict network access to the MariaDB listener using firewall rules so only trusted application hosts can connect.
  • Enable the audit plugin to log all DCL activity until patched binaries are deployed.
bash
# Verify installed MariaDB version and upgrade on Debian/Ubuntu
mariadb --version
sudo apt update
sudo apt install --only-upgrade mariadb-server

# Review recent GRANT PROXY activity in the audit log
grep -Ei 'GRANT[[:space:]]+PROXY' /var/log/mariadb/audit.log

# Minimal privilege revocation example (adjust to your schema)
mariadb -u root -p -e "REVOKE GRANT OPTION ON *.* FROM 'app_user'@'%';"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.