CRITICAL9.8
PYSEC-2026-502
PyMySQL SQL Injection vulnerability
Quick fix
PYSEC-2026-502 — pymysql: upgrade to the fixed version with the command below.
pip install --upgrade 'pymysql>=1.1.1'Details
PyMySQL through 1.1.0 allows SQL injection if used with untrusted JSON input because keys are not escaped by `escape_dict`.
Are you affected?
Enter the version of the package you're using.
Affected packages
References
- https://nvd.nist.gov/vuln/detail/CVE-2024-36039[ADVISORY]
- https://github.com/PyMySQL/PyMySQL/commit/521e40050cb386a499f68f483fefd144c493053c[WEB]
- https://github.com/PyMySQL/PyMySQL[PACKAGE]
- https://github.com/PyMySQL/PyMySQL/releases/tag/v1.1.1[WEB]
- https://lists.debian.org/debian-lts-announce/2024/05/msg00017.html[WEB]
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/23VXBV34GFRICCVYZ6KFMSSWY5UEXCF5[WEB]
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/35VOJS3SRJNLQIO7YTZFNM6RWHIHWTMK[WEB]
- https://pypi.org/project/pymysql[PACKAGE]
- https://github.com/advisories/GHSA-v9hf-5j83-6xpp[ADVISORY]