CVE-2012-2122

Summary

CVECVE-2012-2122
StatePUBLISHED
Assignerredhat
Source PriorityCVE Program / NVD first with legacy fallback
Published2012-06-26 18:55:05 UTC
Updated2026-04-29 01:13:23 UTC
Descriptionsql/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.

Risk And Classification

Primary CVSS: v2.0 5.1 from [email protected]

AV:N/AC:H/Au:N/C:P/I:P/A:P

Problem Types: CWE-287 | n/a

CVSS v2.0 Breakdown

Access Vector
Network
Access Complexity
High
Authentication
None
Confidentiality
Partial
Integrity
Partial
Availability
Partial

AV:N/AC:H/Au:N/C:P/I:P/A:P

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Application Mariadb Mariadb 5.1.41 All All All
Application Mariadb Mariadb 5.1.42 All All All
Application Mariadb Mariadb 5.1.44 All All All
Application Mariadb Mariadb 5.1.47 All All All
Application Mariadb Mariadb 5.1.49 All All All
Application Mariadb Mariadb 5.1.50 All All All
Application Mariadb Mariadb 5.1.51 All All All
Application Mariadb Mariadb 5.1.53 All All All
Application Mariadb Mariadb 5.1.55 All All All
Application Mariadb Mariadb 5.1.60 All All All
Application Mariadb Mariadb 5.1.61 All All All
Application Mariadb Mariadb 5.2.0 All All All
Application Mariadb Mariadb 5.2.1 All All All
Application Mariadb Mariadb 5.2.10 All All All
Application Mariadb Mariadb 5.2.11 All All All
Application Mariadb Mariadb 5.2.2 All All All
Application Mariadb Mariadb 5.2.3 All All All
Application Mariadb Mariadb 5.2.4 All All All
Application Mariadb Mariadb 5.2.5 All All All
Application Mariadb Mariadb 5.2.6 All All All
Application Mariadb Mariadb 5.2.7 All All All
Application Mariadb Mariadb 5.2.8 All All All
Application Mariadb Mariadb 5.2.9 All All All
Application Mariadb Mariadb 5.3.0 All All All
Application Mariadb Mariadb 5.3.1 All All All
Application Mariadb Mariadb 5.3.2 All All All
Application Mariadb Mariadb 5.3.3 All All All
Application Mariadb Mariadb 5.3.4 All All All
Application Mariadb Mariadb 5.3.5 All All All
Application Mariadb Mariadb 5.3.6 All All All
Application Mariadb Mariadb 5.5.20 All All All
Application Mariadb Mariadb 5.5.21 All All All
Application Mariadb Mariadb 5.5.22 All All All
Application Oracle Mysql 5.1.51 All All All
Application Oracle Mysql 5.1.52 All All All
Application Oracle Mysql 5.1.52 sp1 All All
Application Oracle Mysql 5.1.53 All All All
Application Oracle Mysql 5.1.54 All All All
Application Oracle Mysql 5.1.55 All All All
Application Oracle Mysql 5.1.56 All All All
Application Oracle Mysql 5.1.57 All All All
Application Oracle Mysql 5.1.58 All All All
Application Oracle Mysql 5.1.59 All All All
Application Oracle Mysql 5.1.60 All All All
Application Oracle Mysql 5.1.61 All All All
Application Oracle Mysql 5.5.10 All All All
Application Oracle Mysql 5.5.11 All All All
Application Oracle Mysql 5.5.12 All All All
Application Oracle Mysql 5.5.13 All All All
Application Oracle Mysql 5.5.14 All All All
Application Oracle Mysql 5.5.15 All All All
Application Oracle Mysql 5.5.16 All All All
Application Oracle Mysql 5.5.17 All All All
Application Oracle Mysql 5.5.18 All All All
Application Oracle Mysql 5.5.19 All All All
Application Oracle Mysql 5.5.20 All All All
Application Oracle Mysql 5.5.21 All All All
Application Oracle Mysql 5.6.2 All All All
Application Oracle Mysql 5.6.3 All All All
Application Oracle Mysql 5.6.4 All All All
Application Oracle Mysql 5.6.5 All All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Na N/a affected n/a Not specified

References

ReferenceSourceLinkTags
oss-sec: Security vulnerability in MySQL/MariaDB sql/password.c af854a3a-2127-422b-91ae-364da2661108 seclists.org Patch
[security-announce] SUSE-SU-2012:0984-1: important: Security update for af854a3a-2127-422b-91ae-364da2661108 lists.opensuse.org
Gentoo Linux Documentation -- MySQL: Multiple vulnerabilities af854a3a-2127-422b-91ae-364da2661108 security.gentoo.org
Security Alerts - Secunia af854a3a-2127-422b-91ae-364da2661108 secunia.com Vendor Advisory
CVE-2012-2122: A Tragically Comedic Security Flaw in MySQL af854a3a-2127-422b-91ae-364da2661108 community.rapid7.com Exploit
MySQL memcmp() Comparison Error Lets Remote Users Bypass Authentication - SecurityTracker af854a3a-2127-422b-91ae-364da2661108 securitytracker.com
MySQL Bugs: #64884: logins with incorrect password are allowed af854a3a-2127-422b-91ae-364da2661108 bugs.mysql.com Exploit
MySQL Remote Root Authentication Bypass af854a3a-2127-422b-91ae-364da2661108 www.exploit-db.com
MariaDB 5.1.62 Release Notes - AskMonty KnowledgeBase af854a3a-2127-422b-91ae-364da2661108 kb.askmonty.org
About Secunia Research | Flexera af854a3a-2127-422b-91ae-364da2661108 secunia.com
Oracle MySQL CVE-2012-2122 User Login Security Bypass Vulnerability af854a3a-2127-422b-91ae-364da2661108 www.securityfocus.com Exploit
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report