CVE-2012-2122 json
sql/password.c in Oracle MySQL 5.1.x before 5.1.63, 5.5.x before 5.5.24, and 5.6.x before 5.6.6, and MariaDB 5.1.x before 5.1.62, 5.2.x bef…
published 2012-06-26 14 y ago modified 2026-06-16 4 mo ago also EUVD-2012-2124
- cvss
- 5.1
- version 2.0, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 96.6%
- EPSS 96.6% chance of exploitation in 30 days, percentile 99.8%
- public exploits
- 2
- Metasploit, Exploit-DB, plus a Nuclei check
Summary
sql/password.c in Oracle MySQL 5.1.x before 5.1.63, 5.5.x before 5.5.24, and 5.6.x before 5.6.6, and MariaDB 5.1.x before 5.1.62, 5.2.x before 5.2.12, 5.3.x before 5.3.6, and 5.5.x before 5.5.23, when running in certain environments with certain implementations of the memcmp function, allows remote attackers to bypass authentication by repeatedly authenticating with the same incorrect password, which eventually causes a token comparison to succeed due to an improperly-checked return value.
Patch / fix
- mysql RHEL 6 5.1.66-1.el6_3
- mysql-libs RHEL 6 5.1.66-1.el6_3
- mysql-test RHEL 6 5.1.66-1.el6_3
- mysql-bench RHEL 6 5.1.66-1.el6_3
- mysql-server RHEL 6 5.1.66-1.el6_3
- mysql-embedded RHEL 6 5.1.66-1.el6_3
red hat advisories RHSA-2012:1462
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2012-2122 updated cvss 7.5
mysql: incorrect type cast in check_scramble() leading to authentication bypass
-
Red Hat Enterprise Linux 5 mysqlaffected: no fix available
-
Red Hat Enterprise Linux Desktop (v. 6) mysql 5.1.66-1.el6_3, mysql-libs 5.1.66-1.el6_3, mysql-server 5.1.66-1.el6_3 Red Hat Enterprise Linux Desktop Optional (v. 6) mysql 5.1.66-1.el6_3, mysql-test 5.1.66-1.el6_3, mysql-bench 5.1.66-1.el6_3, mysql-embedded 5.1.66-1.el6_3 Red Hat Enterprise Linux HPC Node (v. 6) mysql 5.1.66-1.el6_3, mysql-libs 5.1.66-1.el6_3 Red Hat Enterprise Linux HPC Node Optional (v. 6) mysql 5.1.66-1.el6_3, mysql-test 5.1.66-1.el6_3, mysql-bench 5.1.66-1.el6_3, mysql-server 5.1.66-1.el6_3, mysql-embedded 5.1.66-1.el6_3 Red Hat Enterprise Linux Server (v. 6) mysql 5.1.66-1.el6_3, mysql-libs 5.1.66-1.el6_3, mysql-test 5.1.66-1.el6_3, mysql-bench 5.1.66-1.el6_3, mysql-server 5.1.66-1.el6_3 Red Hat Enterprise Linux Server Optional (v. 6) mysql 5.1.66-1.el6_3, mysql-embedded 5.1.66-1.el6_3fixed: vendor fix RHSA-2012:1462
+2 more productsfewer
Red Hat Enterprise Linux Workstation (v. 6) mysql 5.1.66-1.el6_3, mysql-libs 5.1.66-1.el6_3, mysql-test 5.1.66-1.el6_3, mysql-bench 5.1.66-1.el6_3, mysql-server 5.1.66-1.el6_3 Red Hat Enterprise Linux Workstation Optional (v. 6) mysql 5.1.66-1.el6_3, mysql-embedded 5.1.66-1.el6_3
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Timeline
- First public exploit (Metasploit auxiliary/scanner/mysql/mysql_authbypass_hashdump)
- Published
Exploit prediction
96.62% chance of exploitation in the next 30 days, higher than 99.8% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- Metasploit auxiliary/scanner/mysql/mysql_authbypass_hashdump MySQL Authentication Bypass Password Dump metasploit auxiliary, normal rank, 2012-06-09
- EDB-19092 MySQL - Authentication Bypass remote, 2012-06-12
- Nuclei template MySQL - Authentication Bypass nuclei detection template
- bugs.mysql.com http://bugs.mysql.com/bug.php?id=64884 referenced PoC, tagged "exploit" by a source, unverified
- securityfocus.com http://www.securityfocus.com/bid/53911 referenced PoC, tagged "exploit" by a source, unverified
- community.rapid7.com https://community.rapid7.com/community/metasploit/blog/2012/06/11/cve-2012-2122-a-tragically-comedic-security-flaw-in-mysql referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 2.0 | 5.1 | AV:N/AC:H/Au:N/C:P/I:P/A:P |
Classification
- Weakness
-
- CWE-287 Improper Authentication
- Technology feeds
References
-
seclists.org
/oss-sec/2012/q2/493
mailing-list, patch
-
exploit-db.com
/exploits/19092
exploit
-
bugs.mysql.com
/bug.php?id=64884
exploit
-
securityfocus.com
/bid/53911
vdb-entry, exploit
-
community.rapid7.com
/community/metasploit/blog/2012/06/11/cve-2012-2122-a-tragically-comedic-security-flaw-in-mysql
exploit
-
security.gentoo.org
/glsa/glsa-201308-06.xml
vendor-advisory
-
lists.opensuse.org
/opensuse-security-announce/2012-08/msg00007.html
vendor-advisory
-
secunia.com
/advisories/49417
third-party-advisory, vendor-advisory
-
secunia.com
/advisories/53372
third-party-advisory
-
securitytracker.com
/id?1027143
vdb-entry
- kb.askmonty.org /en/mariadb-5162-release-notes/
Sources
- CVE List CVE-2012-2122
- NVD CVE-2012-2122
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.