CVE-2009-5026

MySQL 5.0.x < 5.0.93 and 5.1.x < 5.1.50 - SQL Injection via Executable Comment Feature

Title source: llm
STIX 2.1

Exploitation Summary

EIP tracks 1 public exploit for CVE-2009-5026. PoCs published by Libing Song.

AI-analyzed exploit summary This exploit leverages a MySQL privilege escalation vulnerability (CVE-2009-5026) by injecting SQL comments to manipulate the `mysql.user` table and grant SUPER privileges to an existing user. The attack abuses MySQL's conditional comment syntax to execute hidden SQL statements.

Description

The executable comment feature in MySQL 5.0.x before 5.0.93 and 5.1.x before 5.1.50, when running in certain slave configurations in which the slave is running a newer version than the master, allows remote attackers to execute arbitrary SQL commands via custom comments.

Exploits (1)

exploitdb WORKING POC VERIFIED
by Libing Song · textremotemultiple
https://www.exploit-db.com/exploits/34796

This exploit leverages a MySQL privilege escalation vulnerability (CVE-2009-5026) by injecting SQL comments to manipulate the `mysql.user` table and grant SUPER privileges to an existing user. The attack abuses MySQL's conditional comment syntax to execute hidden SQL statements.

Classification
Working Poc 95%
Attack Type
Sqli
Complexity
Trivial
Reliability
Reliable
Target: MySQL versions prior to 5.1.50
Auth required
Prerequisites: Valid MySQL user credentials · Access to execute SQL queries on the target database
mistral-large-3 · analyzed Feb 18, 2026 Full analysis →

References (7)

Core 7
Core References
Various Sources x_refsource_confirm
http://dev.mysql.com/doc/refman/5.0/en/news-5-0-93.html
Exploit x_refsource_confirm
http://bugs.mysql.com/bug.php?id=49124
Various Sources x_refsource_confirm
http://dev.mysql.com/doc/refman/5.1/en/news-5-1-50.html
Mailing List mailing-list x_refsource_mlist
http://seclists.org/oss-sec/2011/q4/101
Third Party Advisory third-party-advisory x_refsource_secunia
http://secunia.com/advisories/49179

Scores

EPSS 0.0776
EPSS Percentile 93.9%

Details

CWE
CWE-89
Status published
Products (50)
mysql/mysql 5.0.0
mysql/mysql 5.0.1
mysql/mysql 5.0.2
mysql/mysql 5.0.3
mysql/mysql 5.0.4
mysql/mysql 5.0.5
mysql/mysql 5.0.10
mysql/mysql 5.0.15
mysql/mysql 5.0.16
mysql/mysql 5.0.17
... and 40 more
Published Aug 17, 2012
Tracked Since Feb 18, 2026