CVE-2016-6662 – MySQL Remote Root Code Execution / Privilege Escalation ( 0day )
MySQL versions up to 5.7.15, 5.6.33 and 5.5.52 allow an attacker with authenticated database access or SQL injection to execute arbitrary code as root. The advisory states that successful exploitation could fully compromise the server.
seclists.org
Published on seclists.org
An independent research has revealed multiple severe MySQL vulnerabilities. This advisory focuses on a critical vulnerability with a CVEID of CVE-2016-6662.
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 write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the MySQL server allows a user with database privileges to create or alter configuration files that are loaded on restart, and those files can set environment variables such as LD_PRELOAD to load attacker-controlled code.
What the attacker needed
Authenticated MySQL access or SQL injection; MySQL service restart
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 write-up has not been written yet. The Original tab links to the source.
MySQL is a database server. This bug lets someone who can already run database commands (or inject them through a website) make the database write a malicious configuration file. When the database service restarts, it loads that file and runs the attacker's code with the highest system privileges, called root.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.