Back to CVE catalog

AI summary

MySQL and MariaDB allow remote attackers to bypass authentication in certain environments with certain memcmp implementations. Repeatedly authenticating with the same incorrect password eventually succeeds because a comparison return value is not properly checked.

Generated automatically from the source description. Check the sources below before acting.

CVE-2012-2122

MySQL and MariaDB authentication bypass via memcmp

Multiple products

At a glance

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.

Source description · CVE List / CNA

System impact

Attack complexityHigh
ConfidentialityPartial
IntegrityPartial
AvailabilityPartial

CVSS summary v2.0

5.1Medium
Published:
Updated:
EPSS:
96.619%
Exploited in attacks:
Not confirmed
Ransomware campaigns:
Not confirmed
Attack vector:
Network

Affected software

Vendor, product and affected version ranges.

Vendor, product and affected versions
Vendor:mariadbmariadbAffected versions:
5.1.41Show full version range for mariadb
5.1.425.1.445.1.475.1.495.1.505.1.515.1.535.1.555.1.605.1.615.2.05.2.15.2.105.2.115.2.25.2.35.2.45.2.55.2.65.2.75.2.85.2.95.3.05.3.15.3.25.3.35.3.45.3.55.3.65.5.205.5.215.5.22
Vendor:oraclemysqlAffected versions:
5.1.51Show full version range for mysql
5.1.525.1.535.1.545.1.555.1.565.1.575.1.585.1.595.1.605.1.615.5.105.5.115.5.125.5.135.5.145.5.155.5.165.5.175.5.185.5.195.5.205.5.215.6.25.6.35.6.45.6.5
Vendor:redhatmysql
Environments (1)
  • cpe:/o:redhat:enterprise_linux:6
Affected versions:
< 0:5.1.66-1.el6_3
Vendor:redhatmysql-bench
Environments (1)
  • cpe:/o:redhat:enterprise_linux:6
Affected versions:
< 0:5.1.66-1.el6_3
Vendor:redhatmysql-devel
Environments (1)
  • cpe:/o:redhat:enterprise_linux:6
Affected versions:
< 0:5.1.66-1.el6_3
Vendor:redhatmysql-embedded
Environments (1)
  • cpe:/o:redhat:enterprise_linux:6
Affected versions:
< 0:5.1.66-1.el6_3
Vendor:redhatmysql-embedded-devel
Environments (1)
  • cpe:/o:redhat:enterprise_linux:6
Affected versions:
< 0:5.1.66-1.el6_3
Vendor:redhatmysql-libs
Environments (1)
  • cpe:/o:redhat:enterprise_linux:6
Affected versions:
< 0:5.1.66-1.el6_3
Vendor:redhatmysql-server
Environments (1)
  • cpe:/o:redhat:enterprise_linux:6
Affected versions:
< 0:5.1.66-1.el6_3
Vendor:redhatmysql-test
Environments (1)
  • cpe:/o:redhat:enterprise_linux:6
Affected versions:
< 0:5.1.66-1.el6_3

1–10 of 56 · Page 1 of 6

CVSS scores and metrics5
[email protected] · NVD (Primary)Primary5.1 / 10MediumCVSS 2.0Details
Attack complexity
High
Confidentiality
Partial
Integrity
Partial
Availability
Partial
Attack vector
Network
Authentication
Not required

Source vector

AV:N/AC:H/Au:N/C:P/I:P/A:P
nvd · Wazuh CTI (cna)5.1 / 10MediumCVSS 2.0Details
Attack complexity
High
Confidentiality
Partial
Integrity
Partial
Availability
Partial
Attack vector
Network
Authentication
Not required

Source vector

AV:N/AC:H/Au:N/C:P/I:P/A:P
redhat · Wazuh CTI (adp)7.5 / 10HighCVSS 2.0Details
Attack complexity
Low
Confidentiality
Partial
Integrity
Partial
Availability
Partial
Attack vector
Network
Authentication
Not required

Source vector

AV:N/AC:L/Au:N/C:P/I:P/A:P
alas · Wazuh CTI (adp)7.5 / 10HighCVSS 2.0Details
Attack complexity
Low
Confidentiality
Partial
Integrity
Partial
Availability
Partial
Attack vector
Network
Authentication
Not required

Source vector

AV:N/AC:L/Au:N/C:P/I:P/A:P
Red Hat · Red Hat VEX (adp)7.5 / 10HighCVSS 2.0Details
Attack complexity
Low
Confidentiality
Partial
Integrity
Partial
Availability
Partial
Attack vector
Network
Authentication
Not required

Source vector

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

CVSS measures severity; EPSS estimates exploitation probability. Lack of confirmed attacks does not mean lack of risk.

Sources and advisories24

This product uses the NVD API but is not endorsed or certified by the NVD. CVE® records © The MITRE Corporation, reproduced under the CVE Terms of Use. Data sources and licences