Description
MySQL 4.0.23 and earlier, and 4.1.x up to 4.1.10, uses predictable file names when creating temporary tables, which allows local users with CREATE TEMPORARY TABLE privileges to overwrite arbitrary files via a symlink attack.
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.11 | DSA-707-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 4 | mysql +3 | 4.1.10a-1.RHEL4.1 | RHSA-2005:334 |
| RHEL 3 | mysql +2 | 3.23.58-15.RHEL3.1 | RHSA-2005:334 |
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 4.x - CREATE Temporary TABLE Symlink Privilege Escalation EDB-25211 · remote · Jan 18, 2006 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 2
- RHSA-2005:334 Red Hat Security Advisory: mysql security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- DSA-707-1 mysql - several Debian Security (DSA / DLA) · Mar 9, 2026
References
- oval:org.mitre.oval:def:9591 vdb-entry signature
- 2005-0009 vendor-advisory
- DSA-707 vendor-advisory
- RHSA-2005:334 vendor-advisory
- 101864 vendor-advisory
- SUSE-SA:2005:019 vendor-advisory
- USN-96-1 vendor-advisory
- RHSA-2005:348 vendor-advisory
- 20050310 Mysql insecure temporary file creation with CREATE TEMPORARY TABLE privilege escalation mailing-list
- APPLE-SA-2005-08-15 vendor-advisory
- MDKSA-2005:060 vendor-advisory
- GLSA-200503-19 vendor-advisory
- APPLE-SA-2005-08-17 vendor-advisory
- 12781 vdb-entry