CVE-2026-61700
Patch Available.
This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.
Overview
MariaDB Connector/J is MariaDB's JDBC driver: a JDBC 4.2 compatible driver used to connect applications developed in Java to MariaDB and MySQL databases. It is published to Maven Central as org.mariadb.jdbc:mariadb-java-client, and Spring Boot 2.7.18 manages its 3.1.4 release.
An information exposure vulnerability (CVE-2026-61700) has been identified in MariaDB Connector/J, which allows a rogue or man-in-the-middle database server to obtain the contents of a local file named in an application's LOAD DATA LOCAL INFILE query even when the connection sets allowLocalInfile=false. The option is meant to disable the LOCAL INFILE mechanism entirely, but the driver does not enforce it when the server asks for a file.
Per OWASP: Access control enforces policy such that users cannot act outside of their intended permissions. Failures typically lead to unauthorized information disclosure, modification, or destruction of all data or performing a business function outside the user's limits.
This issue affects multiple versions of MariaDB Connector/J.
Details
Module Info
- Product: MariaDB Connector/J
- Affected packages:
org.mariadb.jdbc:mariadb-java-client - Affected versions: <2.7.14, >=3.0.0 <3.3.5, >=3.4.0 <3.4.3, >=3.5.0 <3.5.9
- GitHub repository: https://github.com/mariadb-corporation/mariadb-connector-j
- Published packages: https://central.sonatype.com/artifact/org.mariadb.jdbc/mariadb-java-client
- Package manager: Maven
- Fixed in:
- OSS MariaDB Connector/J 3.5.9
- NES for MariaDB Connector/J v3.1.7
Vulnerability Info
This Low-severity vulnerability is found in the org.mariadb.jdbc:mariadb-java-client package in multiple versions of MariaDB Connector/J.
When a client runs a LOAD DATA LOCAL INFILE statement, the server answers with a LOCAL INFILE request packet (type 0xfb) naming the file it wants the client to send. The allowLocalInfile connection option controls whether the driver takes part in this exchange, and setting it to false is supposed to disable the mechanism. In the 3.x driver, however, ClientMessage.readPacket handles the 0xfb packet without consulting allowLocalInfile at all:
case (byte) 0xfb:
buf.skip(1); // skip header
SQLException exception = null;
reader.getSequence().set((byte) 1);
InputStream is = getLocalInfileInputStream();
if (is == null) {
String fileName = buf.readStringNullEnd();
if (!message.validateLocalFileName(fileName, context)) {
exception = ...; // file name does not match the initial query
} else {
try {
is = new FileInputStream(fileName);
} catch (FileNotFoundException f) {
...
}
}
}
// sending stream
if (is != null) {
...
while ((len = is.read(fileBuf)) > 0) {
writer.writeBytes(fileBuf, 0, len);
writer.flush();
}
...
}
The only guard is validateLocalFileName, which checks that the requested file name matches the one in the client's own query. A rogue server, or an attacker able to intercept the connection, can therefore reply to the query with a 0xfb packet echoing that file name, and the driver opens the file and streams its contents to the server even though allowLocalInfile=false is set. The exposure is limited to the file the application's own LOAD DATA LOCAL INFILE query names; the server cannot redirect the client to an arbitrary path. Exploitation requires both a malicious or intercepted server connection and an application that issues LOAD DATA LOCAL INFILE statements, which is why the impact is rated as a low-severity confidentiality issue.
Mitigation
MariaDB plc's Engineering Policy lists MariaDB Connector/J 2.7, 3.3, 3.4 and 3.5 as its supported release series. Upstream has made no 3.1.x release since 3.1.4 (April 2023), so no 3.1.x release is available to address this issue. For more information, see here.
Users of the affected components should apply one of the following mitigations:
- Upgrade affected applications to a currently supported release of MariaDB Connector/J that contains the fix.
- Leverage a commercial support partner like HeroDevs for post-EOL security support.
Credits
- tharavel (finder)