Description
SQL injection vulnerability in MySQL 4.1.x before 4.1.20 and 5.0.x before 5.0.22 allows context-dependent attackers to execute arbitrary SQL commands via crafted multibyte encodings in character sets such as SJIS, BIG5, and GBK, which are not properly handled when the mysql_real_escape function is used to escape the input.
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.1 | mysql-dfsg-4.1 | 4.1.11a-4sarge4 | DSA-1092-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 4 | mysql +3 | 4.1.20-1.RHEL4.1 | RHSA-2006:0544 |
Advisories 2
- RHSA-2006:0544 Red Hat Security Advisory: mysql security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- DSA-1092-1 mysql-dfsg-4.1 - programming error Debian Security (DSA / DLA) · Mar 9, 2026
References
- DSA-1092 vendor-advisory
- http://lists.mysql.com/announce/364
- mysql-ascii-sql-injection(26875) vdb-entry
- 20712 third-party-advisory
- MDKSA-2006:097 vendor-advisory
- 20541 third-party-advisory
- TA07-072A third-party-advisory
- 20562 third-party-advisory
- 2006-0034 vendor-advisory
- APPLE-SA-2007-03-13 vendor-advisory
- http://docs.info.apple.com/article.html?artnum=305214
- GLSA-200606-13 vendor-advisory
- 20365 third-party-advisory
- 20531 third-party-advisory
- oval:org.mitre.oval:def:10312 vdb-entry signature
- ADV-2006-2105 vdb-entry
- 18219 vdb-entry
- 20489 third-party-advisory
- 1016216 vdb-entry
- USN-303-1 vendor-advisory
- ADV-2007-0930 vdb-entry
- USN-288-3 vendor-advisory
- http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=369735
- 20625 third-party-advisory
- RHSA-2006:0544 vendor-advisory
- 24479 third-party-advisory