mysql: incorrect type cast in check_scramble() leading to authentication bypass
Published Jun 26, 2012
5.1
MEDIUMCVSS 2.0
EPSS 96.50%
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.
Affected products
No data.
Configuration 1
- 5.1.51
- 5.1.52
- 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
Configuration 2
- 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
Configuration 3
Configuration 4
- 5.1.41
- 5.1.42
- 5.1.44
- 5.1.47
- 5.1.49
- 5.1.50
- 5.1.51
- 5.1.53
- 5.1.55
- 5.1.60
- 5.1.61
Configuration 5
- 5.2.0
- 5.2.1
- 5.2.2
- 5.2.3
- 5.2.4
- 5.2.5
- 5.2.6
- 5.2.7
- 5.2.8
- 5.2.9
- 5.2.10
- 5.2.11
Configuration 6
No data.
Red Hat Enterprise Linux 6
mysql-0:5.1.66-1.el6_3
Fixed · RHSA-2012:1462
Red Hat Enterprise Linux 5
mysql
Affected
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 6 | mysql-0:5.1.66-1.el6_3 | Fixed | RHSA-2012:1462 |
| Red Hat Enterprise Linux 5 | mysql | Affected | n/a |
No package ranges for this CVE.
Remediation
Red Hat statement
This issue does not affect MySQL as shipped with Red Hat Enterprise Linux 4, 5, or 6. For a technical explanation please see https://bugzilla.redhat.com/show_bug.cgi?id=814605#c19
Metrics
No CVSS v4.0 score for this CVE.
No CVSS v3.1 score for this CVE.
No CVSS v3.0 score for this CVE.
AV:N/AC:H/Au:N/C:P/I:P/A:P
This CVE is not in the KEV list.
No CISA SSVC assessment for this CVE yet.
Estimated probability of exploitation in the wild in the next 30 days (FIRST EPSS). As of Oct 1, 2026.
Score over time
2022–2026- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Percentile over time
- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Table of values (16 key points)
Flat stretches are collapsed; showing up to 120 newest points.
| Date | Score | Percentile | Model |
|---|---|---|---|
| Oct 1, 2026 | 96.50% (0.96500) | 99.88th | v5 (v2026.06.15) |
| Jun 15, 2026 | 96.19% (0.96188) | 99.87th | v5 (v2026.06.15) |
| Mar 17, 2025 | 94.08% (0.94077) | 99.89th | v4 (v2025.03.14) |
| Dec 17, 2024 | 95.70% (0.95700) | 99.58th | v3 (v2023.03.01) |
| Jul 15, 2024 | 96.79% (0.96788) | 99.70th | v3 (v2023.03.01) |
| Apr 4, 2024 | 96.81% (0.96810) | 99.67th | v3 (v2023.03.01) |
| Jan 25, 2024 | 97.02% (0.97019) | 99.70th | v3 (v2023.03.01) |
| Nov 22, 2023 | 97.06% (0.97064) | 99.70th | v3 (v2023.03.01) |
| Sep 20, 2023 | 97.08% (0.97079) | 99.67th | v3 (v2023.03.01) |
| Jul 21, 2023 | 97.11% (0.97112) | 99.67th | v3 (v2023.03.01) |
| Mar 7, 2023 | 97.20% (0.97205) | 99.65th | v3 (v2023.03.01) |
| Mar 6, 2023 | 90.08% (0.90084) | 99.84th | v2 (v2022.01.01) |
| Sep 10, 2022 | 90.08% (0.90084) | 99.84th | v2 (v2022.01.01) |
| Jun 9, 2022 | 90.39% (0.90391) | 99.85th | v2 (v2022.01.01) |
| Mar 7, 2022 | 90.87% (0.90870) | 99.84th | v2 (v2022.01.01) |
| Feb 4, 2022 | 91.46% (0.91463) | 99.86th | v2 (v2022.01.01) |
References (15)
- http://bugs.mysql.com/bug.php?id=64884 x_refsource_MISCExploit
- http://kb.askmonty.org/en/mariadb-5162-release-notes/ x_refsource_CONFIRM
- http://lists.opensuse.org/opensuse-security-announce/2012-08/msg00007.html vendor-advisoryx_refsource_SUSE
- http://seclists.org/oss-sec/2012/q2/493 mailing-listx_refsource_MLISTPatch
- http://secunia.com/advisories/49417 third-party-advisoryx_refsource_SECUNIAVendor Advisory
- http://secunia.com/advisories/53372 third-party-advisoryx_refsource_SECUNIA
- http://security.gentoo.org/glsa/glsa-201308-06.xml vendor-advisoryx_refsource_GENTOO
- http://securitytracker.com/id?1027143 vdb-entryx_refsource_SECTRACK
- http://www.exploit-db.com/exploits/19092 exploitx_refsource_EXPLOIT-DB
- http://www.securityfocus.com/bid/53911 vdb-entryx_refsource_BIDExploit
- https://access.redhat.com/security/cve/CVE-2012-2122 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=814605 Issue Tracking
- https://community.rapid7.com/community/metasploit/blog/2012/06/11/cve-2012-2122-a-tragically-comedic-security-flaw-in-mysql x_refsource_MISCExploit
- https://nvd.nist.gov/vuln/detail/CVE-2012-2122
- https://www.cve.org/CVERecord?id=CVE-2012-2122
Change history (0)
No recorded changes yet.