NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · Maven

CVE-2026-119210: MariaDB Connector/J: LOAD DATA LOCAL INFILE file check could be satisfied by text inside quoted identifiers, letting a malicious server read client files

mediumCVSS 3.1 5.9GHSA-fhx5-2xqw-2cgm

MariaDB Connector/J (org.mariadb.jdbc:mariadb-java-client) can be tricked by a rogue or man-in-the-middle database server into sending arbitrary client files to it. The LOAD DATA LOCAL INFILE check matched text inside quoted identifiers. Upgrade to 3.3.7, 3.4.5 or 3.5.11, or set allowLocalInfile=false.

Published Oct 30, 2026 · Analysis Oct 31, 2026

What an attacker can do

When a server answers a query with a LOCAL INFILE request, the driver checks that the file matches a LOAD DATA LOCAL INFILE in the command it sent. In ClientMessage.validateLocalFileName() that check was a regular expression that searched the whole SQL text. It also matched inside backtick-quoted identifiers, string literals and comments.

Some driver paths put server-supplied names straight into the next query. DatabaseMetaData.getImportedKeys() and getExportedKeys() reuse names from SHOW DATABASES, SHOW TABLES and SHOW CREATE TABLE. Updatable result sets build UPDATE and refresh SELECT statements from schema and table names in column definition packets. A hostile server can return a table name such as LOAD DATA LOCAL INFILE '/etc/passwd'. The driver embeds it in SHOW CREATE TABLE, the server replies with a LOCAL INFILE request for /etc/passwd, the check passes, and the file is streamed out.

The attacker must control the server side of the connection, or sit on the network path. allowLocalInfile must be on, which is the default. They can read any file the JVM can read: application config, credentials, key stores. On the getImportedKeys() path the error is swallowed, so the application sees nothing. There is no integrity or availability impact.

Who is affected

Affected: 3.0.0 up to but not including 3.3.7, 3.4.0 up to 3.4.5, and 3.5.0 up to 3.5.11. Only connections with allowLocalInfile enabled (the default) are exposed, and only when the server is malicious or intercepted.

Check which version your build resolves:

mvn dependency:tree -Dincludes=org.mariadb.jdbc:mariadb-java-client

For Gradle, use gradle dependencies --configuration runtimeClasspath and look for the same artifact. Also check fat JARs and application server lib folders.

org.mariadb.jdbc:mariadb-java-client

Ecosystem
Maven
Affected
>= 3.0.0, < 3.3.7
Fixed in
3.3.7
Check
mvn dependency:tree -Dincludes=org.mariadb.jdbc:mariadb-java-client

org.mariadb.jdbc:mariadb-java-client

Ecosystem
Maven
Affected
>= 3.4.0, < 3.4.5
Fixed in
3.4.5
Check
mvn dependency:tree -Dincludes=org.mariadb.jdbc:mariadb-java-client

org.mariadb.jdbc:mariadb-java-client

Ecosystem
Maven
Affected
>= 3.5.0, < 3.5.11
Fixed in
3.5.11
Check
mvn dependency:tree -Dincludes=org.mariadb.jdbc:mariadb-java-client

How to fix it

Upgrade org.mariadb.jdbc:mariadb-java-client to 3.3.7, 3.4.5 or 3.5.11, matching your current minor line. The fix parses the SQL instead of searching it. It skips string literals, quoted identifiers and comments, splits on ;, and accepts only a LOAD DATA or LOAD XML ... LOCAL INFILE at the start of a statement. The file literal or bound parameter must equal the requested file exactly.

If you do not use LOAD DATA LOCAL INFILE, add allowLocalInfile=false to the JDBC URL as a workaround. Also connect over TLS with certificate verification so a man-in-the-middle cannot pose as the server.

How to tell if you were hit

The advisory gives no log signature. Look at the client side: the application host opens files it has no reason to read (for example /etc/passwd or config and key files) in the JVM process, shortly after metadata calls such as getImportedKeys(), getExportedKeys() or ResultSet.updateRow(). Review database server and proxy logs for SHOW CREATE TABLE statements whose identifier contains the text LOAD DATA LOCAL INFILE. Check that your JDBC hosts only connect to servers you trust, and watch for unexpected changes to DNS or routing toward the database.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

MariaDB Connector/J checked a server's LOAD DATA LOCAL INFILE file request by searching the text of the command it had sent for LOAD DATA LOCAL INFILE '<file>'. The search also matched inside quoted identifiers, string literals and comments, so text returned by the server and re-used in a later query could satisfy it. A rogue or MitM server can read any file the client JVM can read.

Details

When a server answers a command with a LOCAL INFILE request (0xFB packet), the connector opens the named file on the client host and streams it to the server, after verifying that the file corresponds to a LOAD DATA LOCAL INFILE of the command it sent (ClientMessage.validateLocalFileName()). That verification was a regular expression whose prefix accepted any character, so it answered "does the text appear anywhere in the SQL", including inside a backtick-quoted identifier.

Several driver paths put identifiers returned by the server straight back into their next query: DatabaseMetaData.getImportedKeys() and getExportedKeys() re-use database and table names from SHOW DATABASES, SHOW TABLES and the REFERENCES clause of SHOW CREATE TABLE output, and updatable result sets build their UPDATE and refresh SELECT from the schema and table names of the column definition packets. A server returning an identifier such as `LOAD DATA LOCAL INFILE '/etc/passwd' makes the connector send SHOW CREATE TABLE LOAD DATA LOCAL INFILE '/etc/passwd'.accounts ; the server answers it with a LOCAL INFILE request for /etc/passwd, the check passes, and the file content is sent. On the getImportedKeys()` path the resulting error is swallowed and the application observes nothing. The same applies to an application that interpolates identifiers obtained from the server into its own queries.

The fix parses the command instead of searching it: string literals, quoted identifiers and comments are skipped, statements are split on ;, and only a LOAD DATA|XML [LOW_PRIORITY|CONCURRENT] LOCAL INFILE found at the start of a statement is considered, its file literal or bound parameter being compared exactly to the requested file.

Impact

Confidentiality: a malicious or compromised server, or a MitM, can read arbitrary files from the host running the JDBC client (application configuration, credential files, key stores, ...) through standard java.sql calls such as DatabaseMetaData.getImportedKeys(), getExportedKeys() or ResultSet.updateRow(). Exploitation requires control of the server side of the connection and allowLocalInfile enabled (the default). Setting allowLocalInfile=false is a workaround when LOAD DATA LOCAL INFILE is not needed. No integrity or availability impact.

Credit

Reported by buxuwa (buxu) through HackerOne

Credited to buxu.

Questions

Does CVE-2026-119210 need a malicious database server?

Yes. The attacker must control the server side of the connection or be a man-in-the-middle. A client connecting only to a trusted server over verified TLS is not exposed.

Is allowLocalInfile=false enough to protect me?

The advisory names it as a workaround when you do not need LOAD DATA LOCAL INFILE. The option is enabled by default, so you must set it explicitly. Upgrading to a patched release is the real fix.

Which fixed version do I need?

3.3.7 for the 3.0 to 3.3 line, 3.4.5 for 3.4, and 3.5.11 for 3.5.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Maven vulnerabilities

All Maven entries