Oracle MySQL up to 5.6.5 Password Authentication sql/password.c memcmp improper authentication
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 5.1 | $0-$5k | 0.00 |
Summary
A vulnerability, which was classified as very critical, has been found in Oracle MySQL. This vulnerability affects the function memcmp of the file sql/password.c of the component Password Authentication. This manipulation causes improper authentication.
This vulnerability appears as CVE-2012-2122. The attack may be initiated remotely. In addition, an exploit is available. Due to its background and reception, this vulnerability has an historic impact.
It is recommended to apply a patch to fix this issue.
Details
A vulnerability has been found in Oracle MySQL (Database Software) and classified as critical. Affected by this vulnerability is the function memcmp of the file sql/password.c of the component Password Authentication. The manipulation with an unknown input leads to a improper authentication vulnerability. The CWE definition for the vulnerability is CWE-287. When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. As an impact it is known to affect confidentiality, integrity, and availability. The summary by CVE is:
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.
The bug was discovered 06/09/2012. The weakness was presented 06/09/2012 by Sergei Golubchik with MariaDB as confirmed mailinglist post (oss-sec mailing list). It is possible to read the advisory at seclists.org. The vendor was not involved in the public release. This vulnerability is known as CVE-2012-2122 since 04/04/2012. The attack can be launched remotely. The exploitation doesn't need any form of authentication. Technical details and also a public exploit are known. The pricing for an exploit might be around USD $0-$5k at the moment (estimation calculated on 09/01/2024). Due to its background and reception, this vulnerability has a historic impact. The advisory points out:
This flaw was rooted in an assumption that the memcmp() function would always return a value within the range -127 to 127 (signed character). On some platforms and with certain optimizations enabled, this routine can return values outside of this range, eventually causing the code that compares a hashed password to sometimes return true even when the wrong password is specified. Since the authentication protocol generates a different hash each time this comparison is done, there is a 1 in 256 chance that ANY password would be accepted for authentication.
A public exploit has been developed by HD Moore (HDM) in Shell-Skript and been published 2 days after the advisory. It is possible to download the exploit at community.rapid7.com. It is declared as highly functional. We expect the 0-day to have been worth approximately $25k-$100k. The vulnerability scanner Nessus provides a plugin with the ID 74673 (openSUSE Security Update : mysql-cluster (openSUSE-SU-2012:0860-1)), which helps to determine the existence of the flaw in a target environment. It is assigned to the family SuSE Local Security Checks and running in the context l. The commercial vulnerability scanner Qualys is able to test this issue with plugin 165533 (SUSE Enterprise Linux Security Update for MySQL (SUSE-SU-2012:0984-1)). It is possible to verify the existence of the vulnerability with: @for i in `seq 1 1000`; do mysql -u root --password=bad -h 127.0.0.1 2>/dev/null; done@
Applying a patch is able to eliminate this problem. The bugfix is ready for download at bazaar.launchpad.net.Proper firewalling of tcp/3306 (mysql) is able to address this issue. The best possible mitigation is suggested to be patching the affected component. A possible mitigation has been published before and not just after the disclosure of the vulnerability.
The vulnerability is also documented in the databases at Exploit-DB (19092), Tenable (74673), SecurityFocus (BID 53911†), OSVDB (82804†) and Secunia (SA49417†). See VDB-5779 and VDB-61672 for similar entries. Be aware that VulDB is the high quality source for vulnerability data.
Product
Type
Vendor
Name
Version
- 5.1.51
- 5.1.52
- 5.1.53
- 5.1.54
- 5.1.55
- 5.1.56
- 5.1.57
- 5.1.58
- 5.1.59
- 5.1.60
- 5.1.61
- 5.5.10
- 5.5.11
- 5.5.12
- 5.5.13
- 5.5.14
- 5.5.15
- 5.5.16
- 5.5.17
- 5.5.18
- 5.5.19
- 5.5.20
- 5.5.21
- 5.6.2
- 5.6.3
- 5.6.4
- 5.6.5
License
Website
- Vendor: https://www.oracle.com
CPE 2.3
CPE 2.2
Screenshot

Video

CVSSv4
VulDB Vector: 🔍VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 5.6VulDB Meta Temp Score: 5.1
VulDB Base Score: 5.6
VulDB Temp Score: 5.1
VulDB Vector: 🔍
VulDB Reliability: 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍
NVD Base Score: 🔍
Exploiting
Class: Improper authenticationCWE: CWE-287
CAPEC: 🔍
ATT&CK: 🔍
Physical: No
Local: No
Remote: Yes
Availability: 🔍
Access: Public
Status: Highly functional
Author: HD Moore (HDM)
Programming Language: 🔍
Download: 🔍
EPSS Score: 🔍
EPSS Percentile: 🔍
Price Prediction: 🔍
Current Price Estimation: 🔍
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Nessus ID: 74673
Nessus Name: openSUSE Security Update : mysql-cluster (openSUSE-SU-2012:0860-1)
Nessus File: 🔍
Nessus Risk: 🔍
Nessus Family: 🔍
Nessus Context: 🔍
Nessus Port: 🔍
OpenVAS ID: 71475
OpenVAS Name: Debian Security Advisory DSA 2496-1 (mysql-5.1)
OpenVAS File: 🔍
OpenVAS Family: 🔍
Qualys ID: 🔍
Qualys Name: 🔍
MetaSploit ID: mysql_authbypass_hashdump.rb
MetaSploit Name: MySQL Authentication Bypass Password Dump
MetaSploit File: 🔍
Exploit-DB: 🔍
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: PatchStatus: 🔍
0-Day Time: 🔍
Exploit Delay Time: 🔍
Patch: bazaar.launchpad.net
Firewalling: 🔍
McAfee IPS: 🔍
McAfee IPS Version: 🔍
ISS Proventia IPS: 🔍
Fortigate IPS: 🔍
Timeline
04/04/2012 🔍05/07/2012 🔍
06/09/2012 🔍
06/09/2012 🔍
06/11/2012 🔍
06/11/2012 🔍
06/11/2012 🔍
06/11/2012 🔍
06/12/2012 🔍
06/13/2012 🔍
06/26/2012 🔍
06/13/2014 🔍
09/01/2024 🔍
Sources
Vendor: oracle.comAdvisory: seclists.org
Researcher: Sergei Golubchik
Organization: MariaDB
Status: Confirmed
Confirmation: 🔍
CVE: CVE-2012-2122 (🔍)
GCVE (CVE): GCVE-0-2012-2122
GCVE (VulDB): GCVE-100-5503
OVAL: 🔍
SecurityFocus: 53911 - Oracle MySQL CVE-2012-2122 User Login Security Bypass Vulnerability
Secunia: 49417
OSVDB: 82804 - CVE-2012-2122 - Oracle - Multiple Products - Security Bypass Issue
SecurityTracker: 1027143
Vulnerability Center: 35326 - Oracle MySQL Complied With Linux Glibc Sse-Optimized memcmp Option Allows Authentication Bypass, Medium
scip Labs: https://www.scip.ch/en/?labs.20161013
See also: 🔍
Entry
Created: 06/11/2012 16:43Updated: 09/01/2024 19:55
Changes: 06/11/2012 16:43 (108), 07/30/2019 20:21 (10), 09/01/2024 19:55 (16)
Complete: 🔍
Cache ID: 216::103
Be aware that VulDB is the high quality source for vulnerability data.
No comments yet. Languages: en.
Please log in to comment.