MariaDB mariadb-dump Utility Directory Traversal Remote Code Execution Vulnerability
The mariadb-dump utility fails to validate a user-supplied path derived from a view name before using it in file operations. An attacker who can influence a view name could cause the utility to write files outside the intended directory and potentially execute code as the current user.
This vulnerability allows remote attackers to execute arbitrary code on affected installations of MariaDB. Interaction with the mariadb-dump utility is required to exploit this vulnerability but attack vectors may vary depending on the implementation.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely, the utility builds a file path from a view name without sanitising path traversal sequences or restricting the destination directory.
Impact
An attacker could execute arbitrary code in the context of the user running mariadb-dump, though the advisory notes that interaction with the utility is required and attack vectors may vary.
What the attacker needed
Interaction with mariadb-dump; ability to influence a view name
The fix
MariaDB issued an update to correct the vulnerability.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A database view is a saved query that acts like a table. When the mariadb-dump backup tool handles a view name, it uses that name to build a file path without checking it. If the name contains path tricks, the tool can be made to write files somewhere else, which can lead to running code.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.