Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate with FILE-privileged DB account
-
DeliveryWrite env file into /run/mysqld via INTO OUTFILE
-
ExploitAwait or provoke mariadb.service restart
-
ExecutionSystemd loads attacker-controlled EnvironmentFile
-
ImpactInject mariadbd options and escalate on host
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A02:2025 - Security Misconfiguration
ASVS 5.0
V13 - Configuration Configuration hardening
|
| Exploitation Conditions | Requires (1) a MariaDB account holding the FILE privilege; (2) secure-file-priv configured to permit writes into /run/mysqld (not the default restricted import/export directory), enabling creation of /run/mysqld/wsrep-new-cluster; (3) an installation using the packaged mariadb.service systemd unit (Debian/RPM layouts where that directory is writable by the mysql user); and (4) a subsequent restart of mariadb.service, since the injected EnvironmentFile is only consumed on the next start. Limiting factors that reduce realistic risk: the FILE privilege is a high, non-default grant; the vulnerable secure-file-priv target path is non-default; and exploitation is gated on an administrator-triggered service restart rather than being immediately attacker-controlled. |
| Impact | The vendor CVSS of 8.4 (CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H) is driven largely by the scope change (S:C) - a database user escalating into the host/systemd context - combined with full C/I/A impact. However, the AV:N rating is somewhat misleading: although the FILE privilege is exercised over a network SQL connection, actual exploitation depends on writing to a local path (/run/mysqld) that is only reachable when secure-file-priv is configured to permit it, which is NOT the default. The vector already honestly reflects the main gates with PR:H (requires a FILE-privileged account) and UI:R (the injected environment only takes effect on the NEXT service restart, i.e. an administrator action). No EPSS score, CISA KEV entry, or public POC is present in the provided data, so there is no public exploit identified at time of analysis and no evidence of active exploitation. Net assessment: this is a genuine local-to-root style privilege-escalation primitive rather than a mass-exploitable remote RCE - a meaningful priority for multi-tenant or Galera/wsrep MariaDB deployments where untrusted users hold FILE privilege, but materially lower real-world risk than the 8.4 implies for single-admin installations with default secure-file-priv. Conflicting signal to verify: CVSS says AV:N while the description requires local filesystem write via a non-default configuration - treat the network-exploitability as conditional. |
| Exploit ScenarioDerived | In a shared or Galera-clustered MariaDB deployment, a database account holding the FILE privilege, on a host where secure-file-priv permits writing into /run/mysqld, uses SQL (e.g. SELECT ... INTO OUTFILE) to create /run/mysqld/wsrep-new-cluster containing attacker-controlled _WSREP_NEW_CLUSTER/environment content. When the mariadb.service unit is next restarted, systemd reads that file as an EnvironmentFile and injects the attacker-controlled values into the service, letting the attacker influence the mariadbd command line and escalate beyond their database authorization. No public exploit code is identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 09, 2026
Privilege escalation in MariaDB Server (10.6.1 up to 10.6.28, 10.11.x before 10.11.19, 11.4.x before 11.4.13, 11.8.x before 11.8.9, 12.3.x before 12.3.3, and 13.0.x before 13.0.2) allows an authenticated database user holding the FILE privilege to plant a /run/mysqld/wsrep-new-cluster file when secure-file-priv permits writes into that runtime directory, which the packaged mariadb.service systemd unit subsequently consumes as an EnvironmentFile. On the next administrator-triggered restart of mariadb.service, attacker-controlled environment values are injected into the mariadbd process, escalating from the database user context onto the host/systemd layer (scope change) with full confidentiality, integrity, and availability impact. The vendor rates this 8.4 while our independent assessment uses CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:H, reflecting that exploitation requires a high, non-default privilege and a restart gate; no public exploit code has been identified at time of analysis, and patched releases are already available.
RemediationAI
Vendor-released patch: upgrade MariaDB Server to 10.6.28, 10.11.19, 11.4.13, 11.8.9, 12.3.3, or 13.0.2 as appropriate for your release line - these contain the upstream fix that moves the environment file out of the mariadbd-writable runtime directory and eliminates the wsrep-start-position EnvironmentFile. Where immediate upgrade is not possible, the highest-value compensating control is to revoke the FILE privilege from any account that does not strictly require it (GRANT/REVOKE at the database level), which removes the write primitive entirely at the cost of breaking legitimate server-side import/export workflows; equally effective is tightening secure-file-priv back to a dedicated directory that the mysql user cannot use to reach /run/mysqld, at the cost of losing ad hoc file writes to arbitrary paths. Administrators can also harden the systemd unit by removing or replacing the 'EnvironmentFile=-/run/mysqld/wsrep-new-cluster' (and any wsrep-start-position) lines and passing the Galera bootstrap flag through an operator-managed path, though note this must be reapplied after package upgrades; and the tmpfiles/rundir ownership can be adjusted so /run/mysqld is not writable by the mysql user, which may break socket creation depending on layout. As a detection measure, audit /run/mysqld (and /run/mariadb) for unexpected wsrep-new-cluster or wsrep-start-position files and monitor service restarts for unexpected environment values. Full details are in GHSA-mhvc-vqcq-7vq5, the upstream commit e3d62d4e78fd4941cef3f5053e6a50d0b32d740e, and MariaDB Jira MDEV-40629.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 6 packages in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is CWE-15, External Control of System or Configuration Setting, realized through systemd's EnvironmentFile mechanism. The affected packages install mariadb.service with an ExecStart of 'mariadbd $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION' and EnvironmentFile=-@INSTALL_RUNDATADIR@/wsrep-new-cluster, where INSTALL_RUNDATADIR resolved to /run/mysqld on Debian-style layouts (and /run/mariadb on RPM layouts) - a directory that the mariadbd process runs with the ability to write into. The galera_new_cluster.sh helper created that file to pass the _WSREP_NEW_CLUSTER='--wsrep-new-cluster' bootstrap flag into the Galera cluster startup. Because a database user with the FILE privilege can direct writes through secure-file-priv to that same path (when configured to allow it, which is not the default restricted import/export directory), the user can pre-author the environment file that systemd will read on the next service start, injecting arbitrary variable values into the service environment. The upstream fix (commit e3d62d4e78fd4941cef3f5053e6a50d0b32d740e) renames INSTALL_RUNDATADIR to INSTALL_RUNDIR, relocates the environment file to /run/mariadb-wsrep-new-cluster (outside the socket/rundata directory writable by mariadbd), adds shell traps in galera_new_cluster.sh to delete the file on exit or signal, removes the wsrep-start-position EnvironmentFile in favor of an inline ExecStart shell command substitution via galera_recovery, and updates tmpfiles.conf so the runtime directory is no longer created with ownership that lets mariadbd write it.
Know when MariaDB 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
AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H
PR:H for the FILE privilege and AC:H because exploitation needs non-default secure-file-priv permitting /run/mysqld writes; UI:R for the required restart and S:C for DB-user-to-host escalation.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
MariaDB server is a community developed fork of MySQL server. From 10.6.1 until 10.6.28, 10.11.19, 11.4.13, 11.8.9, 12.3.3, and 13.0.2, the mariadb.service unit used /run/mysqld/wsrep-new-cluster during the next service restart. A database user with FILE privilege and a secure-file-priv configuration permitting writes to /run/mysqld could create that file and inject attacker-controlled environment values into the restarted service. This issue is fixed in versions 10.6.28, 10.11.19, 11.4.13, 11.8.9, 12.3.3, and 13.0.2.
Technical POC Analysis
Advisory: GHSA-mhvc-vqcq-7vq5, tracked upstream as MDEV-40629.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
MariaDB Server installations across the 10.6, 10.11, 11.4, 11.8, 12.3, and 13.0 release lines carry a privilege-escalation flaw that lets a database user with the FILE privilege redirect the service's own systemd startup configuration, ultimately handing host-level control to an attacker on the next administrator-triggered restart. Because the impact crosses from the database into the underlying operating system, an affected instance can become a foothold for broader infrastructure compromise, jeopardizing the confidentiality, integrity, and availability of every workload sharing that host. No vendor patch is available, so leadership should expect remediation to depend on configuration hardening and privileged-access reduction rather than a routine update.
No vendor-released patch identified at time of analysis. Interim mitigations: revoke the FILE privilege from all database accounts that do not require it; configure secure-file-priv to a location outside /run/mysqld and not writable by the mariadbd service account; ensure /run/mysqld is owned by root with permissions that prevent the database user from creating files there; harden the packaged mariadb.service systemd unit by removing or restricting the EnvironmentFile reference to /run/mysqld/wsrep-new-cluster; monitor that directory with file-integrity or auditd rules for unexpected file creation; and restrict the set of administrators permitted to restart mariadb.service.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Oracle MySQL through 5.5.52, 5.6.x through 5.6.33, and 5.7.x through 5.7.15; MariaDB before 5.5.51, 10.0.x before 10.0.2
MySQL 5.5.19 and possibly other versions, and MariaDB 5.5.28a and possibly other versions, when configured to assign the
The dtls1_reassemble_fragment function in d1_both.c in OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
sql/password.c in Oracle MySQL 5.1.x before 5.1.63, 5.5.x before 5.5.24, and 5.6.x before 5.6.6, and MariaDB 5.1.x befor
Heap-based buffer overflow in Oracle MySQL 5.5.19 and other versions through 5.5.28, and MariaDB 5.5.28a and possibly ot
Stack-based buffer overflow in the acl_get function in Oracle MySQL 5.5.19 and other versions through 5.5.28, and 5.1.53
The ssl3_send_client_key_exchange function in s3_clnt.c in OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before
mysqld_safe in Oracle MySQL through 5.5.51, 5.6.x through 5.6.32, and 5.7.x through 5.7.14; MariaDB; Percona Server befo
The dtls1_get_message_fragment function in d1_both.c in OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.
Oracle MySQL before 5.7.3, Oracle MySQL Connector/C (aka libmysqlclient) before 6.1.3, and MariaDB before 5.5.44 use the
The BN_mod_sqrt() function, which computes a modular square root, contains a bug that can cause it to loop forever for n
EUVD-2026-95919
NVD
CVE.org
EPSS
GitHub
VulDB
Exploit-DB