Authentication bypassin CVE-2012-2122.
Weaponized: a Metasploit exploit is public.
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.
- No source names a fix yet. Watch this page or the product for updates; we never guess a fixed version.
Not confirmed by any source yet: affected versions not confirmed; fixed version not confirmed; severity not scored yet. We show these as not confirmed instead of guessing.
Affected and fixed versions
From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.
From first report to first attacks
- 4 Apr 2012CVE ID reserved by redhat.
- 9 Jun 2012Metasploit module: MySQL Authentication Bypass Password Dump.
- 26 Jun 2012Published in the CVE List.
- 9 May 2013First public proof of concept on GitHub.
- 6 Aug 2024CVE record last updated.
Attack code anyone can find
Exploit maturity: Weaponized (Metasploit).
6 proof of concept repositories on GitHub. No fix or workaround is known yet, so we count them but do not link to them.
Listed so defenders can judge how urgent this is and test systems they are authorised to test. Patchminder does not host exploit code; links open the source page. Labels for GitHub repositories come from their public details and are never a promise about the code. Run anything only in an isolated lab.
Report a link
Nothing on this page links to exploit code right now. To report anything else, write to the contact point in the legal notice.
- bugs.mysql.com x_refsource_MISC
- www.securityfocus.com vdb-entry, x_refsource_BID
- secunia.com third-party-advisory, x_refsource_SECUNIA
- security.gentoo.org vendor-advisory, x_refsource_GENTOO
- lists.opensuse.org vendor-advisory, x_refsource_SUSE
- community.rapid7.com x_refsource_MISC
- securitytracker.com vdb-entry, x_refsource_SECTRACK
- secunia.com third-party-advisory, x_refsource_SECUNIA
- seclists.org mailing-list, x_refsource_MLIST
- kb.askmonty.org x_refsource_CONFIRM
Patchminder. CVE-2012-2122: Authentication bypass in CVE-2012-2122. https://patchminder.com/cve/cve-2012-2122/ (accessed 5 December 2026).