MariaDB Connector/J denial of service in length-encoded integer parsing
mariadb-corporation mariadb-connector-j
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| org.mariadb.jdbc:mariadb-java-client Maven |
|
|
mariadb-corporation mariadb-connector-j
| Product | Affected | Fixed in |
|---|---|---|
| org.mariadb.jdbc:mariadb-java-client Maven |
|
|
MariaDB Connector/J is used to connect applications developed in Java to MariaDB and MySQL databases. From 3.0.0 until 3.3.7, 3.4.5, and 3.5.10, the ReadableByteBuf.readLength() and ReadableByteBuf.readIntLengthEncodedNotNull() methods narrowed the protocol's unsigned 8-byte length-encoded integer to a Java int without checking that the value fit a non-negative integer. Values above Integer.MAX_VALUE could wrap to a negative or unrelated length that downstream allocation and read paths used. A malicious or compromised server, or a machine-in-the-middle attacker, could trigger NegativeArraySizeException, out-of-bounds failures, or oversized allocation behavior in client connection handling. This issue is fixed in versions 3.3.7, 3.4.5, and 3.5.10.
From the CVE record · GitHub_M
MariaDB Connector/J narrows an unsigned 8-byte protocol length to a Java int without checking its range. A malicious or compromised server, or a machine-in-the-middle attacker, can supply a value that causes exceptions, out-of-bounds failures, or oversized allocation during client connection handling. The input does not specify authentication or user-interaction requirements.
Teams using Maven package org.mariadb.jdbc:mariadb-java-client in versions >=3.0.0 <3.3.7, >=3.4.0 <3.4.5, or >=3.5.0 <3.5.10 should check their deployments.