Description
MySQL 3.x before 3.23.59, 4.x before 4.0.19, 4.1.x before 4.1.2, and 5.x before 5.0.1, checks the CREATE/INSERT rights of the original table instead of the target table in an ALTER TABLE RENAME operation, which could allow attackers to conduct unauthorized activities.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 3.0 | mysql | 3.23.49-8.8 | DSA-562-2 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 1
- MySQL 3.x/4.x - ALTER TABLE/RENAME Forces Old Permission Checks EDB-24669 · remote · Oct 8, 2004 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 1
- DSA-562-2 mysql - several vulnerabilities Debian Security (DSA / DLA) · Mar 9, 2026
References
- http://bugs.mysql.com/bug.php?id=3270
- http://www.mysql.org/doc/refman/4.1/en/news-4-1-2.html
- RHSA-2004:611 vendor-advisory
- 12783 third-party-advisory
- DSA-562 vendor-advisory
- 101864 vendor-advisory
- 11357 vdb-entry
- CLA-2004:892 vendor-advisory
- http://www.mysql.org/doc/refman/4.1/en/news-4-0-19.html
- mysql-alter-restriction-bypass(17666) vdb-entry
- RHSA-2004:597 vendor-advisory
- P-018 third-party-advisory government-resource
- GLSA-200410-22 vendor-advisory
- 2004-0054 vendor-advisory
- http://lists.mysql.com/internals/13073
- 1011606 vdb-entry