PyMySQL SQL Injection vulnerability
PyMySQL through 1.1.0 allows SQL injection if used with untrusted JSON input because keys are not escaped by escape_dict.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | pymysql | < 1.1.1 | 1.1.1 |
References
- https://nvd.nist.gov/vuln/detail/CVE-2024-36039
- https://github.com/PyMySQL/PyMySQL/commit/521e40050cb386a499f68f483fefd144c493053c
- https://github.com/PyMySQL/PyMySQL
- https://github.com/PyMySQL/PyMySQL/releases/tag/v1.1.1
- https://lists.debian.org/debian-lts-announce/2024/05/msg00017.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/23VXBV34GFRICCVYZ6KFMSSWY5UEXCF5
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/35VOJS3SRJNLQIO7YTZFNM6RWHIHWTMK
- https://pypi.org/project/pymysql
- https://github.com/advisories/GHSA-v9hf-5j83-6xpp
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H- Weakness (CWE)
CWE-89- Platform
- Python (PyPI)
- Package
pymysql- Disclosed
- 21.05.2024
- Updated
- 11.10.2026 15:17
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2026-502 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-v9hf-5j83-6xpp - CC BY 4.0
Vulnerability history: pymysql
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
This is the only known vulnerability of this package.
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.