Vulnerability · Published May 21, 2024 · Assigned by mitre

CVE-2024-36039

Medium 6.3

In plain English

A medium-severity SQL injection in the python3.11-PyMySQL package (AlmaLinux). There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.7% (higher than 53% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.3Medium
Exploit odds (30 days)0.7%top 47.0% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack tooling1Public PoC

Official description

PyMySQL through 1.1.0 allows SQL injection if used with untrusted JSON input because keys are not escaped by escape_dict.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8python3.11-PyMySQL1.0.2-2.el8_10ALSA-2024:4244
AlmaLinux:9python3.11-PyMySQL1.0.2-2.el9ALSA-2024:9194
AlmaLinux:9python3.11-PyMySQL+rsa1.0.2-2.el9ALSA-2024:9194
AlmaLinux:8python3.12-PyMySQL1.1.0-3.el8_10ALSA-2024:4245
AlmaLinux:9python3.12-PyMySQL1.1.0-3.el9ALSA-2024:9193
AlmaLinux:9python3.12-PyMySQL+rsa1.1.0-3.el9ALSA-2024:9193
Debian:12python-pymysql1.0.2-2+deb12u1DEBIAN-CVE-2024-36039
Debian:12python-pymysql1.0.2-2+deb12u1DSA-5700-1
Debian:13python-pymysql1.1.1-1DEBIAN-CVE-2024-36039
Debian:14python-pymysql1.1.1-1DEBIAN-CVE-2024-36039
PyPIpymysql1.1.1GHSA-v9hf-5j83-6xpp
PyPIpymysql1.1.1PYSEC-2026-502
Rocky Linux:8python3.11-PyMySQL0:1.0.2-2.el8_10RLSA-2024:4244
Rocky Linux:8python3.12-PyMySQL0:1.1.0-3.el8_10RLSA-2024:4245
Rocky Linux:9python3.12-PyMySQL0:1.1.0-3.el9RLSA-2024:9193
Ubuntu:22.04:LTSpython-pymysql1.0.2-1ubuntu1.22.04.1USN-6801-1
Ubuntu:22.04:LTSpython-pymysql1.0.2-1ubuntu1.22.04.1UBUNTU-CVE-2024-36039
Ubuntu:24.04:LTSpython-pymysql1.0.2-2ubuntu1.1UBUNTU-CVE-2024-36039
Ubuntu:24.04:LTSpython-pymysql1.0.2-2ubuntu1.1USN-6801-1

Affected products (as reported)

VendorProductVersions
n/a n/a n/a

Weakness: CWE-89 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L

References