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
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-clientFor 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
Read for this analysis:
- https://github.com/advisories/GHSA-fhx5-2xqw-2cgm
- https://github.com/mariadb-corporation/mariadb-connector-j/releases/tag/3.5.11
- https://github.com/mariadb-corporation/mariadb-connector-j/security/advisories/GHSA-fhx5-2xqw-2cgm
- https://nvd.nist.gov/vuln/detail/CVE-2026-119210
- https://github.com/mariadb-corporation/mariadb-connector-j/commit/4d2f8002399949ed7f138e9c0b75b69229538120
- https://github.com/mariadb-corporation/mariadb-connector-j/commit/5812e0ca7574c3934915179b76f2e819a556d099
- https://github.com/mariadb-corporation/mariadb-connector-j/commit/a4891f877f1c885a573194771c1ed0aacec0ce1d
- https://github.com/mariadb-corporation/mariadb-connector-j/releases/tag/3.3.7
- https://github.com/mariadb-corporation/mariadb-connector-j/releases/tag/3.4.5
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 entriesCVE-2026-119276
MariaDB Connector/J: Rogue server can drive large heap allocations from server-declared lengths in OK packets
medium5.9Oct 30, 2026CVE-2026-119279
MariaDB Connector/J: Length-encoded integers larger than Integer.MAX_VALUE were truncated before being used as lengths
medium5.9Oct 30, 2026CVE-2026-119280
MariaDB Connector/J: XA recover() trusted server-supplied gtrid and bqual lengths
low3.7Oct 30, 2026CVE-2026-119281
MariaDB Connector/J: Server could switch character_set_results away from UTF-8 without the client noticing
medium5.9Oct 30, 2026CVE-2026-61700
MariaDB Connector/J does not enforce allowLocalInfile=false on server-initiated LOCAL INFILE requests
low3.7Sep 17, 2026CVE-2026-55856
MariaDB has cleartext password disclosure to a MITM on the initial-handshake
medium5.9Aug 28, 2026
