Intel

AIKIDO-2024-10340

mysql-connector-python is vulnerable to SQL Injection

SQL InjectionCVE-2024-21272

60

Medium Risk

This Affects:

pythonmysql-connector-python
8.3.0 - 9.0.0
Fixed in 9.1.0

TL;DR

Affected versions of the package are vulnerable to SQL Injection. Malicious strings can be injected when using dictionary-based query parameterization with the cursor.execute() API command, particularly in the C-based implementation of the connector. This could allow attackers to manipulate SQL queries and gain unauthorized access to or modify the database.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

mysql-connector-python is vulnerable to SQL Injection in versions 8.3.0 - 9.0.0.

How to fix this

Upgrade the mysql-connector-python library to the patch version.