CVE-2023-22102: Mysql connector j MySQL Connectors Takeover Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-m6vm-37g8-gqvh
CVSS 8.3
Published
Advisory Summary

CVE-2023-22102 is a HIGH (CVSS 8.3) mysql connectors takeover vulnerability vulnerability (General Security Weakness) affecting Mysql connector j libraries in the Maven ecosystem. The issue involves mysql connectors takeover vulnerability. Remediation is available by upgrading affected packages to version 8.2.0.

CVE-2023-22102 at a Glance

CVE Identifier CVE-2023-22102
GHSA Identifier GHSA-m6vm-37g8-gqvh
Severity HIGH
CVSS v3.1 Base Score 8.3
CWE Classification General Security Weakness
Affected Product Mysql connector j
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 8.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2023-22102

To remediate this vulnerability, upgrade all affected Mysql connector j dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

com.mysql:mysql-connector-j fixed: 8.2.0
<dependency>
    <groupId>com.mysql</groupId>
    <artifactId>mysql-connector-j</artifactId>
    <version>8.2.0</version>
</dependency>
mysql:mysql-connector-java fixed: Latest secure release
<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>Latest secure release</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=com.mysql

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2023-22102, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=com.mysql

Analyze the terminal output to locate any version of Mysql connector j in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 8.2.0), your application is affected.

Note: The mvn dependency:tree -Dincludes=com.mysql command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Mysql connector j, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Vulnerability in the MySQL Connectors product of Oracle MySQL (component: Connector/J). Supported versions that are affected are 8.1.0 and prior. Difficult to exploit vulnerability allows unauthenticated attacker with network access via multiple protocols to compromise MySQL Connectors. Successful attacks require human interaction from a person other than the attacker and while the vulnerability is in MySQL Connectors, attacks may significantly impact additional products (scope change). Successful attacks of this vulnerability can result in takeover of MySQL Connectors.

CVE-2023-22102 Affected Mysql connector j Versions

2 component(s)
Fixed Versions:
8.2.0
Product / Package Ecosystem Affected Versions Fixed Version
com.mysql:mysql-connector-j
Maven
< 8.2.0
8.2.0
mysql:mysql-connector-java
Maven
≤ 8.0.33

References

Frequently Asked Questions

What is CVE-2023-22102?
CVE-2023-22102 is a security vulnerability in Mysql connector j involving MySQL Connectors takeover vulnerability under General Security Weakness.
Which Mysql connector j versions are affected?
Affected versions include releases prior to 8.2.0 across affected packages: com.mysql:mysql-connector-j, mysql:mysql-connector-java.
What version fixes CVE-2023-22102?
Upgrading to 8.2.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mysql-connector-j affected?
Yes, com.mysql:mysql-connector-j is affected in releases prior to 8.2.0. Upgrade your dependency to 8.2.0 or later.
Is mysql-connector-java affected?
Yes, mysql:mysql-connector-java is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2023-22102?
CVE-2023-22102 has a CVSS v3.1 base score of 8.3 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2023-22102?
CVE-2023-22102 is classified under General Security Weakness.
How can I check Maven dependencies for CVE-2023-22102?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=com.mysql'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-m6vm-37g8-gqvh",
  "modified" : "2024-12-05T15:46:43Z",
  "published" : "2023-10-18T00:31:42Z",
  "aliases" : [ "CVE-2023-22102" ],
  "summary" : "MySQL Connectors takeover vulnerability",
  "details" : "Vulnerability in the MySQL Connectors product of Oracle MySQL (component: Connector/J). Supported versions that are affected are 8.1.0 and prior. Difficult to exploit vulnerability allows unauthenticated attacker with network access via multiple protocols to compromise MySQL Connectors. Successful attacks require human interaction from a person other than the attacker and while the vulnerability is in MySQL Connectors, attacks may significantly impact additional products (scope change). Successful attacks of this vulnerability can result in takeover of MySQL Connectors.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.mysql:mysql-connector-j"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "8.2.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "mysql:mysql-connector-java"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "8.0.33"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-22102"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mysql/mysql-connector-j"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mysql/mysql-connector-j/compare/8.1.0...8.2.0"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20231027-0007"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuoct2023.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-08-29T18:32:05Z",
    "nvd_published_at" : "2023-10-17T22:15:15Z"
  }
}