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.
CVE-2012-2122
“—” beside the score: it is equal to NVD's CVSS v2 base score.
This CVE was only ever scored under CVSS v2.0. NVD CVSS v2.0 base 5.1 — NVD rates that MEDIUM (NVD's v2 bands: LOW 0.0–3.9 / MEDIUM 4.0–6.9 / HIGH 7.0–10.0; no CRITICAL band). Vector AV:N/AC:H/Au:N/C:P/I:P/A:P. CVSS v2 is an older, coarser metric than v3.1/v4.0 (no Scope, no User Interaction, no Attack Requirements), so it is not directly comparable to a v3 or v4 score. NVD has never re-scored this record under v3. EPSS predicts 96% exploitation probability in the next 30 days; it does not lift the v2 base. EPSS sets EG Risk's exploitation input. Confidence: LOW.
- High exploitation likelihood — EPSS 96%
- Public exploit code is available (Metasploit, Exploit-DB, marked verified by Exploit-DB)
A fix is available — apply it.
- CVSS v2.0 (legacy)
- 5.1MEDIUMNVD never assigned a CVSS v3 rating to this CVE
- EG Score
- 5.1MEDIUMlow confidence
- EG Risk
- 62EG Risk 62/100
EG Risk is EchelonGraph's 0–100 priority score: it fuses intrinsic severity with real-world exploitation and automatability so you can rank equal-severity CVEs and fix the most dangerous first. Higher = act sooner. Distinct from the 0–10 EG Score (severity).
How it’s computed (value × EchelonGraph’s weight)Severity51% × 45%The EG Score, 5.1 of 10.Exploitation96% × 40%FIRST EPSS: the 30-day exploitation probability when EchelonGraph scored this CVE.Automatability0% × 15%CISA's BOD 26-04 default: no one has published Automatable for this CVE, and CISA treats it as “no” for a CVE not in KEV.SSVC (CISA's decision table, applied by EchelonGraph): Track at low, Track* at medium and Attend at high mission impact.Exploitation public PoC (exploit code on record) · Automatable no (CISA's BOD 26-04 default) · Technical impact total (CISA's BOD 26-04 default). EchelonGraph holds no SSVC assessment of this CVE from CISA: none of these inputs is from Vulnrichment. EchelonGraph applied CISA's decision table to them; CISA publishes SSVC inputs and the table, not a decision for each CVE.Action: A fix is available. Apply it within your standard update timelines at low or medium mission impact and sooner than that at high. - EPSS PROB
- 96%
- EPSS %ILE
- 99th
- KEV
- Not listed
SSVC (CISA's decision table, applied by EchelonGraph)Track at low, Track* at medium and Attend at high mission impact.
A fix is available. Apply it within your standard update timelines at low or medium mission impact and sooner than that at high.
Exploitation public PoC (exploit code on record) · Automatable no (CISA's BOD 26-04 default) · Technical impact total (CISA's BOD 26-04 default). EchelonGraph holds no SSVC assessment of this CVE from CISA: none of these inputs is from Vulnrichment. EchelonGraph applied CISA's decision table to them; CISA publishes SSVC inputs and the table, not a decision for each CVE. Mission impact is CISA's Mission & Well-being decision point, and only you can judge it. CISA's table makes it high when Mission Prevalence is Essential — the vulnerable component "directly provides capabilities that constitute at least one MEF for at least one entity" (MEF: mission essential function) — or when Public Well-Being Impact is Irreversible: "multiple fatalities are likely", the cyber-physical system "is likely lost or destroyed", "extreme or serious externalities" are imposed on other parties, or social systems such as elections or the financial grid "are destabilized and potentially collapse". CISA's decision table
BOD 26-04 (CISA's remediation timeline, Table 1)14 days if the affected system is publicly exposed; Fix on system upgrade if it is not.
In CISA KEV no (CISA's KEV catalog) · Automatable no (CISA's BOD 26-04 default) · Technical impact total (CISA's BOD 26-04 default). Where an input reads “CISA's BOD 26-04 default”, no one has published it for this CVE, and CISA's implementation guidance says: “If “Automatable” and “Technical Impact” information items about a CVE ID are not available and the CVE ID is not in the KEV Catalog, CISA will treat its values as “no” and “total,” respectively, until CISA or a third party provides metadata about the CVE ID. CISA will always provide the Vulnrichment data for a CVE ID listed in the KEV Catalog.” Whether your system is publicly exposed is yours to answer. BOD 26-04 binds US Federal Civilian Executive Branch agencies; for anyone else it is CISA's published timeline, a reference rather than an obligation. The directive · how EchelonGraph applies it
Published
June 26, 2012
Last Modified
April 29, 2026
References (11)
- secalert@redhat · CVE Programhttp://bugs.mysql.com/bug.php?id=64884Exploit
- secalert@redhat · CVE Programhttp://kb.askmonty.org/en/mariadb-5162-release-notes/
- secalert@redhat · CVE Programhttp://lists.opensuse.org/opensuse-security-announce/2012-08/msg00007.html
- secalert@redhat · CVE Programhttp://seclists.org/oss-sec/2012/q2/493Patch
- secalert@redhat · CVE Programhttp://secunia.com/advisories/49417 (archived copy: the site no longer serves it)Third-party advisory (tagged Vendor Advisory by NVD)
- secalert@redhat · CVE Programhttp://secunia.com/advisories/53372 (archived copy: the site no longer serves it)
- secalert@redhat · CVE Programhttp://security.gentoo.org/glsa/glsa-201308-06.xml
- secalert@redhat · CVE Programhttp://securitytracker.com/id?1027143
- secalert@redhat · CVE Programhttp://www.exploit-db.com/exploits/19092
- secalert@redhat · CVE Programhttp://www.securityfocus.com/bid/53911 (archived copy: the site no longer serves it)Exploit
- secalert@redhat · CVE Programhttps://community.rapid7.com/community/metasploit/blog/2012/06/11/cve-2012-2122-a-tragically-comedic-security-flaw-in-mysqlExploit
Vendor Advisories for CVE-2012-2122(1)
These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.
Patch Availability(2)
| Vendor / Ecosystem | Fix (by version range) / Patch | Released | Source |
|---|---|---|---|
| ubuntu | mysql-server-5.1 (5.1.63-0ubuntu0.11.04.1) @ natty | 2026-05-29 | ubuntu |
| redhat | mysql-0:5.1.66-1.el6_3 | 2012-11-14 | redhat |
Patches are aggregated from vendor advisories (Red Hat, Microsoft, Cisco, GitHub) and package ecosystems (OSV, GHSA). Multiple rows for the same upstream release have been deduplicated.
Affected Packages
(1 across 1 ecosystem)
Debian:6.0(1)
| Package | Vulnerable range | Fix by version range | Dependents |
|---|---|---|---|
| mysql-5.1 | 5.1.49-3 ... 5.1.62-1+m68k (21 versions) |
| — |
Weakness Classification(1)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
Additional Vendor Advisories
(1)
Vendors that published advisories for this CVE beyond the curated set above. Broader coverage but minimal per-row detail — click through for the original advisory.
Data Freshness Timeline
(refreshed 1× in last 7d / 3× in last 30d)
Each row is a time one of our pipelines fetched, updated or re-scored this CVE. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. An arrow marks a change the record states ("CVSS v3 → 9.1"); EPSS and GHSA rows show the values recorded at that time, not what changed (EPSS values are rounded; hover one for the exact figures). Most recent first.
A repeat, a row identical to one the same pipeline wrote less than 10 seconds earlier, is not a separate refresh and is not counted. 10 repeat rows among the latest 43 are merged into the row they repeat.
- 2026-10-12 01:38 UTCEG score recompute
- 2026-09-29 08:28 UTCEG score recompute
- 2026-09-24 13:57 UTCEPSS rescoreEPSS 96% · 99th percentile
- 2026-09-05 15:22 UTCEPSS rescoreEPSS 96% · 99th percentile
- 2026-08-28 21:34 UTCEPSS rescoreEPSS 96% · 99th percentile
- 2026-08-21 23:43 UTCEPSS rescoreEPSS 96% · 99th percentile
- 2026-07-26 13:45 UTCEG score recomputeAssessed again: 5.1 MEDIUM
- 2026-07-25 14:12 UTCEPSS rescoreEPSS 96% · 99th percentile
- 2026-07-23 01:11 UTCVendor advisory
- 2026-07-23 01:11 UTCGHSA enrichmentGHSA-4qx9-mwf7-7cx8
- 2026-07-23 01:08 UTCVendor advisory
- 2026-07-23 01:08 UTCGHSA enrichmentGHSA-4qx9-mwf7-7cx8
- 2026-07-23 01:07 UTCVendor advisory
- 2026-07-23 01:07 UTCGHSA enrichmentGHSA-4qx9-mwf7-7cx8
- 2026-07-23 01:07 UTCEG score recompute▼ 9.00
- 2026-07-23 00:10 UTCEG score recompute
- 2026-07-22 21:49 UTCEG score recompute
- 2026-07-22 14:04 UTCEPSS rescoreEPSS 96% · 99th percentile
- 2026-07-09 19:05 UTCEPSS rescoreEPSS 96% · 99th percentile
- 2026-06-23 21:30 UTCEPSS rescoreEPSS 96% · 99th percentile
- 2026-06-22 14:22 UTCEPSS rescoreEPSS 96% · 99th percentile
- 2026-06-19 19:22 UTCEPSS rescoreEPSS 96% · 99th percentile
- 2026-06-16 17:49 UTCEPSS rescoreEPSS 96% · 99th percentile
- 2026-06-15 17:44 UTCEPSS rescoreEPSS 96% · 99th percentile
- 2026-06-04 13:09 UTCEPSS rescoreEPSS 94% · 99th percentile
Show 8 moreShow fewer
- 2026-05-31 00:14 UTCEPSS rescoreEPSS 94% · 99th percentile
- 2026-05-29 04:11 UTCEG score recompute
- 2026-05-29 04:11 UTCVendor advisory
- 2026-05-29 04:11 UTCGHSA enrichmentGHSA-4qx9-mwf7-7cx8
- 2026-05-26 07:16 UTCEPSS rescoreEPSS 94% · 99th percentile
- 2026-05-22 21:15 UTCEPSS rescoreEPSS 94% · 99th percentile
- 2026-05-21 22:39 UTCEPSS rescoreEPSS 94% · 99th percentile
- 2026-05-18 21:29 UTCEPSS rescoreEPSS 94% · 99th percentile
Publicly available exploits
(3 references)Public exploit code is referenced for this CVE (1 Metasploit module, 1 Exploit-DB entry), as is 1 Nuclei detection template. A detection template checks whether a system is affected; it is not necessarily exploit code. Defenders should treat patch urgency accordingly.
- Exploit-DBEDB-19092✓ verifiedPublished Jun 12, 2012
MySQL - Authentication Bypass
Open source ↗ - Metasploitauxiliary/scanner/mysql/mysql_authbypass_hashdump✓ verifiedPublished Jun 11, 2012
MySQL Authentication Bypass Password Dump
Open source ↗ - Nucleijavascript/cves/2012/CVE-2012-2122.yamlPublished Apr 3, 2024
MySQL - Authentication Bypass
Open source ↗
Related CVEs(same product + same vendor + same CWE)
Same product
10 shownDebian:6.0:mysql-5.1
Same vendor
10 shownredhat:RHSA-2012:1462
Frequently asked(4)
What is CVE-2012-2122?
When was CVE-2012-2122 made public?
Is CVE-2012-2122 actively exploited?
How do I remediate CVE-2012-2122?
Dependency Blast Radius
See which npm, PyPI, Go, and Maven packages are affected by CVE-2012-2122
Is Your Infrastructure Affected by CVE-2012-2122?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.