Skip to content

RCE and Unauthorized DB Access

Moderate
hsuamz published GHSA-vj9v-mpjv-qf74 Jan 19, 2024

Package

maven com/mysql/cj /jdbc (Maven)

Affected versions

< 1.1.12

Patched versions

1.1.13

Description

The issue existed in the java.sql.DriverManager.getConnection() method when used with untrusted inputs. The connection property propertiesTransform can be abused to load and execute arbitrary classes. The following example illustrates the vulnerability:

conn = DriverManager.getConnection("jdbc:mysql://localhost/test?" + "user=test&password=test&propertiesTransform=com.example.MyArbitraryClass");

In this example, the static initializer of com.example.MyArbitraryClass will be executed even if the class does not implement the ConnectionPropertiesTransform interface.

Impact

The discovered vulnerability allows attackers to compromise MySQL connectors. Successful attacks of this vulnerability can result in the following:

Unauthorized ability to cause a hang or frequently repeatable crash (complete DOS) of MySQL Connectors.
Unauthorized update, insert or delete access to some of MySQL Connectors' accessible data.
Unauthorized read access to a subset of MySQL Connectors accessible data.
Arbitrary code execution.

Patches

1.1.13+ (https://github.com/awslabs/aws-mysql-jdbc/releases/tag/1.1.13)

Workarounds

No. Please upgrade the driver to 1.1.13+.

References

https://nvd.nist.gov/vuln/detail/CVE-2023-21971

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
High
User interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:H

CVE ID

CVE-2023-21971

Weaknesses

No CWEs