CVE-2012-2122
Description
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.
Severity
not scored
CVSS v3
not scored
Exploit chance (EPSS)
96.619%
chance of exploitation in the next 30 days
higher than 99.9% of scored CVEs · 2026-11-17
CISA KEV
Not listed
Public exploit code
Yes
Exploit references (NVD and CNA): 4
Metasploit modules: 1
Nuclei templates: 1
Exploit-DB: 1
Weakness
- CWE-287: Improper Authentication
Timeline
- 2012-06-12First Exploit-DB entry (EDB-ID 19092)14 days before publication
- 2012-06-26Published by the CNA18:00 UTC
Exploit and advisory records
| Exploit-DB | Type | Platform | Published | EDB-verified |
|---|---|---|---|---|
| EDB-ID 19092 | remote | multiple | 2012-06-12 | yes |
Nuclei templates:
- CVE-2012-2122: MySQL - Authentication Bypass
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| mariadb mariadb | 5.1.41no fix listed5.1.42no fix listed5.1.44no fix listed5.1.47no fix listed5.1.49no fix listed(+28 more) | not listednot listednot listednot listednot listed |
| oracle mysql | 5.1.51no fix listed5.1.52no fix listed5.1.53no fix listed5.1.54no fix listed5.1.55no fix listed(+22 more) | not listednot listednot listednot listednot listed |
References
- http://seclists.org/oss-sec/2012/q2/493
- http://lists.opensuse.org/opensuse-security-announce/2012-08/msg00007.html
- http://secunia.com/advisories/49417
- http://security.gentoo.org/glsa/glsa-201308-06.xml
- http://bugs.mysql.com/bug.php?id=64884
- http://www.exploit-db.com/exploits/19092
- http://www.securityfocus.com/bid/53911
- https://community.rapid7.com/community/metasploit/blog/2012/06/11/cve-2012-2122-a-tragically-comedic-security-flaw-in-mysql
- http://kb.askmonty.org/en/mariadb-5162-release-notes/
- http://secunia.com/advisories/53372
- http://securitytracker.com/id?1027143
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2012-2122'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2012-2122'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2012-2122'curl 'https://api.contrastcyber.com/cve_products/CVE-2012-2122'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).