Executive brief
MariaDB Connector/J is a Java database driver used by applications to connect to MariaDB databases. The connector has a security setting called `allowLocalInfile=false` intended to prevent applications from loading local files from the client into the database. However, a rogue or man-in-the-middle server can trick the connector into bypassing this protection and exposing file contents. The impact is limited to files that the application itself intended to load, but the security guarantee of the safety flag is undermined.
Technical details
The vulnerability is an improper access control flaw (CWE-284) in how MariaDB Connector/J handles the `allowLocalInfile` security flag during LOCAL INFILE operations. When a client executes `LOAD DATA LOCAL INFILE '/path/to/file'`, the connector transmits the filename to the server. A malicious or compromised server responds with a protocol packet (type 0xfb) echoing that filename, and the connector reads and transmits the file content without checking the `allowLocalInfile=false` setting. Attack vector is network-based and requires high attack complexity (a rogue/MitM server must be in place). The bypass is constrained: an attacker cannot redirect to arbitrary files like `/etc/passwd` unless the application's own query targets them. Patches are available in versions 2.7.14, 3.3.5, 3.4.3, and 3.5.9.
Affected products
- MariaDB Corporation Connector/J < 2.7.14; >= 3.0.0 < 3.3.5; >= 3.4.0 < 3.4.3; >= 3.5.0 < 3.5.9
Timeline
- 2026-07-10: disclosed: Published to GitHub Advisory Database
- 2026-09-17: patched: Patched versions released: 2.7.14, 3.3.5, 3.4.3, 3.5.9