CVE-2012-2122
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,...
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.
Exploit likelihood
What each source reports
NVD Score used
5.1
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.
- Record
CVE-2012-2122- CVSS 2.0
- 5.1 Medium
AV:N/AC:H/Au:N/C:P/I:P/A:P - Weakness
- CWE-287
- Updated
- 2026-11-02
CVE List No score
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.
- Record
CVE-2012-2122- Updated
- 2026-11-02
EUVDEUVD-2012-2124 No score
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.
- Record
EUVD-2012-2124- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-4qx9-mwf7-7cx8 No score
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,...
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.
- Record
GHSA-4qx9-mwf7-7cx8- Weakness
- CWE-287
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
mysql-5.1Debian:6.0 From an advisory covering 10 CVEs |
before 5.1.63-0+squeeze1, plus listed versions 5.1.49-35.1.50-15.1.51-15.1.53-15.1.54-1 Show 16 moreShow less5.1.54-25.1.55-15.1.56-15.1.57-15.1.57-1.15.1.57-1.25.1.57-1.35.1.57-25.1.57-35.1.57-3.15.1.58-15.1.61-0+squeeze15.1.61-25.1.61-35.1.62-15.1.62-1+m68k |
5.1.63-0+squeeze1 |
mysqlRed Hat:enterprise_linux:6::client From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-debuginfoRed Hat:enterprise_linux:6::client From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-libsRed Hat:enterprise_linux:6::client From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-serverRed Hat:enterprise_linux:6::client From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-benchRed Hat:enterprise_linux:6::client From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-develRed Hat:enterprise_linux:6::client From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-embeddedRed Hat:enterprise_linux:6::client From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-embedded-develRed Hat:enterprise_linux:6::client From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-testRed Hat:enterprise_linux:6::client From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
Show 27 moreShow less
| Package | Affected | Fixed |
|---|---|---|
mysqlRed Hat:enterprise_linux:6::computenode From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-debuginfoRed Hat:enterprise_linux:6::computenode From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-libsRed Hat:enterprise_linux:6::computenode From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-benchRed Hat:enterprise_linux:6::computenode From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-develRed Hat:enterprise_linux:6::computenode From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-embeddedRed Hat:enterprise_linux:6::computenode From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-embedded-develRed Hat:enterprise_linux:6::computenode From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-serverRed Hat:enterprise_linux:6::computenode From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-testRed Hat:enterprise_linux:6::computenode From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysqlRed Hat:enterprise_linux:6::server From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-benchRed Hat:enterprise_linux:6::server From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-debuginfoRed Hat:enterprise_linux:6::server From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-develRed Hat:enterprise_linux:6::server From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-libsRed Hat:enterprise_linux:6::server From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-serverRed Hat:enterprise_linux:6::server From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-testRed Hat:enterprise_linux:6::server From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-embeddedRed Hat:enterprise_linux:6::server From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-embedded-develRed Hat:enterprise_linux:6::server From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysqlRed Hat:enterprise_linux:6::workstation From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-benchRed Hat:enterprise_linux:6::workstation From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-debuginfoRed Hat:enterprise_linux:6::workstation From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-develRed Hat:enterprise_linux:6::workstation From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-libsRed Hat:enterprise_linux:6::workstation From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-serverRed Hat:enterprise_linux:6::workstation From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-testRed Hat:enterprise_linux:6::workstation From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-embeddedRed Hat:enterprise_linux:6::workstation From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
mysql-embedded-develRed Hat:enterprise_linux:6::workstation From an advisory covering 18 CVEs |
before 0:5.1.66-1.el6_3 | 0:5.1.66-1.el6_3 |
Public exploits
Links only. Every CVE stores no exploit code.
| Source | Link | Date |
|---|---|---|
| Exploit-DB | MySQL - Authentication Bypass | 2012-06-12 |
| PoC in GitHub | Avinza/CVE-2012-2122-scanner | 2013-05-09 |
| PoC in GitHub | cyberharsh/Oracle-mysql-CVE-2012-2122 | 2020-06-24 |
| PoC in GitHub | zhangkaibin0921/CVE-2012-2122 | 2023-12-01 |
| PoC in GitHub | netw0rk7/CVE-2012-2122-Home-Lab | 2025-11-24 |
| PoC in GitHub | CyberCTF/vulhub-mysql-cve-2012-2122 | 2026-10-08 |
| Metasploit | MySQL Authentication Bypass Password Dump | 2012-06-09 |
| Nuclei | MySQL - Authentication Bypass |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, exploits, facts | ||
| aliases | EUVD | |
| first indexed | CVE List, Exploit-DB, GitHub Advisories, Metasploit, Nuclei, NVD, OSV, PoC in GitHub |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2012-2122 is a medium vulnerability (CVSS 5.1) in Mariadb, published June 18, 2012. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 96.6%, the 99th percentile. No source names a fixed version.
References
bugs.mysql.com/bug.php?id=64884
securityfocus.com/bid/53911
exploit-db.com/exploits/19092
secunia.com/advisories/53372
security.gentoo.org/glsa/glsa-201308-06.xml
lists.opensuse.org/opensuse-security-announce/2012-08/msg00007.html
Show 89 moreShow less
community.rapid7.com/community/metasploit/blog/2012/06/11/cve-2012-2122-a-tragically-comedic-security-flaw-in-mysql
securitytracker.com/id?1027143
secunia.com/advisories/49417
seclists.org/oss-sec/2012/q2/493
kb.askmonty.org/en/mariadb-5162-release-notes
nvd.nist.gov/vuln/detail/CVE-2012-2122
github.com/advisories/GHSA-4qx9-mwf7-7cx8
access.redhat.com/errata/RHSA-2012:1462
access.redhat.com/security/updates/classification
oracle.com/technetwork/topics/security/cpuapr2012-366314.html
oracle.com/technetwork/topics/security/cpujul2012-392727.html
oracle.com/technetwork/topics/security/cpuoct2012-1515893.html
dev.mysql.com/doc/refman/5.1/en/news-5-1-62.html
dev.mysql.com/doc/refman/5.1/en/news-5-1-63.html
dev.mysql.com/doc/refman/5.1/en/news-5-1-64.html
dev.mysql.com/doc/refman/5.1/en/news-5-1-65.html
dev.mysql.com/doc/refman/5.1/en/news-5-1-66.html
bugzilla.redhat.com/show_bug.cgi?id=814285
bugzilla.redhat.com/show_bug.cgi?id=814287
bugzilla.redhat.com/show_bug.cgi?id=814293
bugzilla.redhat.com/show_bug.cgi?id=833737
bugzilla.redhat.com/show_bug.cgi?id=841349
bugzilla.redhat.com/show_bug.cgi?id=841351
bugzilla.redhat.com/show_bug.cgi?id=841353
bugzilla.redhat.com/show_bug.cgi?id=867212
bugzilla.redhat.com/show_bug.cgi?id=867213
bugzilla.redhat.com/show_bug.cgi?id=867215
bugzilla.redhat.com/show_bug.cgi?id=867216
bugzilla.redhat.com/show_bug.cgi?id=867217
bugzilla.redhat.com/show_bug.cgi?id=867220
bugzilla.redhat.com/show_bug.cgi?id=867223
bugzilla.redhat.com/show_bug.cgi?id=867230
bugzilla.redhat.com/show_bug.cgi?id=867233
bugzilla.redhat.com/show_bug.cgi?id=867238
security.access.redhat.com/data/csaf/v2/advisories/2012/rhsa-2012_1462.json
access.redhat.com/security/cve/CVE-2012-0540
cve.org/CVERecord?id=CVE-2012-0540
nvd.nist.gov/vuln/detail/CVE-2012-0540
access.redhat.com/security/cve/CVE-2012-1688
cve.org/CVERecord?id=CVE-2012-1688
nvd.nist.gov/vuln/detail/CVE-2012-1688
access.redhat.com/security/cve/CVE-2012-1689
cve.org/CVERecord?id=CVE-2012-1689
nvd.nist.gov/vuln/detail/CVE-2012-1689
access.redhat.com/security/cve/CVE-2012-1690
cve.org/CVERecord?id=CVE-2012-1690
nvd.nist.gov/vuln/detail/CVE-2012-1690
access.redhat.com/security/cve/CVE-2012-1703
cve.org/CVERecord?id=CVE-2012-1703
nvd.nist.gov/vuln/detail/CVE-2012-1703
access.redhat.com/security/cve/CVE-2012-1734
cve.org/CVERecord?id=CVE-2012-1734
nvd.nist.gov/vuln/detail/CVE-2012-1734
access.redhat.com/security/cve/CVE-2012-2122
bugzilla.redhat.com/show_bug.cgi?id=814605
cve.org/CVERecord?id=CVE-2012-2122
access.redhat.com/security/cve/CVE-2012-2749
cve.org/CVERecord?id=CVE-2012-2749
nvd.nist.gov/vuln/detail/CVE-2012-2749
access.redhat.com/security/cve/CVE-2012-3150
cve.org/CVERecord?id=CVE-2012-3150
nvd.nist.gov/vuln/detail/CVE-2012-3150
access.redhat.com/security/cve/CVE-2012-3158
cve.org/CVERecord?id=CVE-2012-3158
nvd.nist.gov/vuln/detail/CVE-2012-3158
access.redhat.com/security/cve/CVE-2012-3160
cve.org/CVERecord?id=CVE-2012-3160
nvd.nist.gov/vuln/detail/CVE-2012-3160
access.redhat.com/security/cve/CVE-2012-3163
cve.org/CVERecord?id=CVE-2012-3163
nvd.nist.gov/vuln/detail/CVE-2012-3163
access.redhat.com/security/cve/CVE-2012-3166
cve.org/CVERecord?id=CVE-2012-3166
nvd.nist.gov/vuln/detail/CVE-2012-3166
access.redhat.com/security/cve/CVE-2012-3167
cve.org/CVERecord?id=CVE-2012-3167
nvd.nist.gov/vuln/detail/CVE-2012-3167
access.redhat.com/security/cve/CVE-2012-3173
cve.org/CVERecord?id=CVE-2012-3173
nvd.nist.gov/vuln/detail/CVE-2012-3173
access.redhat.com/security/cve/CVE-2012-3177
cve.org/CVERecord?id=CVE-2012-3177
nvd.nist.gov/vuln/detail/CVE-2012-3177
access.redhat.com/security/cve/CVE-2012-3180
cve.org/CVERecord?id=CVE-2012-3180
nvd.nist.gov/vuln/detail/CVE-2012-3180
access.redhat.com/security/cve/CVE-2012-3197
cve.org/CVERecord?id=CVE-2012-3197
nvd.nist.gov/vuln/detail/CVE-2012-3197