MariaDB Connector/J does not enforce allowLocalInfile=false on server-initiated LOCAL INFILE requests
Low severity
GitHub Reviewed
Published
Jul 10, 2026
in
mariadb-corporation/mariadb-connector-j
•
Updated Sep 17, 2026
Package
Affected versions
< 2.7.14
>= 3.0.0, < 3.3.5
>= 3.4.0, < 3.4.3
>= 3.5.0, < 3.5.9
Patched versions
2.7.14
3.3.5
3.4.3
3.5.9
Description
Published to the GitHub Advisory Database
Sep 17, 2026
Reviewed
Sep 17, 2026
Last updated
Sep 17, 2026
Summary
MariaDB Connector/J does not enforce
allowLocalInfile=falsewhenprocessing server-initiated LOCAL INFILE requests (protocol packet
type
0xfb). However, exploitation is constrained: the server canonly request the exact filename the client already included in its
LOAD DATA LOCAL INFILEquery, it cannot redirect to arbitrary paths.Details
When a client executes
LOAD DATA LOCAL INFILE '/path/to/file', theconnector sends the filename to the server as part of the COM_QUERY.
A rogue or MitM server responds with a
0xfbpacket echoing thatsame filename. The connector, without checking
allowLocalInfile,transmits the file content.
The bypass is therefore limited to the file the application itself
intended to load. The attacker cannot escalate to other files
(e.g.
/etc/passwd) unless the application's own query targets them.The real-world risk is:
LOAD DATA LOCAL INFILEon potentiallysensitive files (credentials, exports, configs) and connects over
an untrusted network.
allowLocalInfile=falseis supposed to disable this entiremechanism as a defense-in-depth measure, but the flag is ignored.
Impact
The security guarantee of
allowLocalInfile=falseis not upheld,but practical exploitation requires both a MitM/rogue server and an
application that actively uses LOCAL INFILE on sensitive data.
Credit
Reported by tharavel
References