Intel

AIKIDO-2025-10240

mysql-connector-python is vulnerable to Arbitrary File Read

Arbitrary File Read Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Apr 16, 2025

49

Medium Risk

This Affects:

pythonmysql-connector-python
1.0.5 - 9.2.0
Fixed in 9.3.0
Are you affected? Scan for Free

TL;DR

Affected versions of this package are vulnerable to Arbitrary File Read due to insufficient validation when the local_infile option is enabled in MySQL. This option determines whether the server permits clients to load data from local files using the LOAD DATA LOCAL INFILE SQL statement. In the patched version, the client-side connector enforces stricter validation by ensuring that the filename provided in the server’s response matches the filename specified in the client’s request, mitigating the risk of unauthorized file access.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and the local_infile option is enabled.

Background info

mysql-connector-python is vulnerable to Arbitrary File Read in versions 1.0.5 - 9.2.0.

How to fix this

Upgrade the mysql-connector-python library to the patch version or disable the local_infile option.