CVE-2024-36039 — Vulnerability in pymysql — CVE Details
CRITICAL
PyMySQL SQL Injection vulnerability
Published June 29, 2026Updated July 1, 2026Source: osv
Summary
PyMySQL through 1.1.0 allows SQL injection if used with untrusted JSON input because keys are not escaped by `escape_dict`.
Advisory Timeline
- First published June 29, 2026 (105 days ago).
- Last revised July 1, 2026 — 2 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
pip
Update pymysql to 1.1.1 or laterpip install "pymysql>=1.1.1"
After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: pypi (1).
| Package | Ecosystem | Affected | Fixed In |
|---|---|---|---|
| pymysql | pypi | 0.10.0, 0.10.1, 0.2, 0.3 (+38 more) | 1.1.1 |
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
References
- https://nvd.nist.gov/vuln/detail/CVE-2024-36039ADVISORY
- https://github.com/PyMySQL/PyMySQL/commit/521e40050cb386a499f68f483fefd144c493053cWEB
- https://github.com/PyMySQL/PyMySQLPACKAGE
- https://github.com/PyMySQL/PyMySQL/releases/tag/v1.1.1WEB
- https://lists.debian.org/debian-lts-announce/2024/05/msg00017.htmlWEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/23VXBV34GFRICCVYZ6KFMSSWY5UEXCF5WEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/35VOJS3SRJNLQIO7YTZFNM6RWHIHWTMKWEB
- https://pypi.org/project/pymysqlPACKAGE
- https://github.com/advisories/GHSA-v9hf-5j83-6xppADVISORY
Frequently Asked Questions
- What is CVE-2024-36039?
- PyMySQL SQL Injection vulnerability This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
- How do I check if my project is affected by CVE-2024-36039?
- CVE-2024-36039 affects pymysql. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-36039 and 200,000+ other known vulnerabilities.
Severity & Exploitability
CVSS Score
9.8
Exploitation is straightforward and causes maximum impact. Patch immediately.
Also Known As
PYSEC-2026-502
GHSA-v9hf-5j83-6xpp
Related CVEs
- CVE-2026-61447CRITICAL
PraisonAI: CodeAgent Executes LLM-Generated Code Without Sandboxing and Leaks All Environment Secrets
- CVE-2026-61445CRITICAL
PraisonAI: AICoder Arbitrary File Write and Command Execution via LLM Tool Calls
Check if you're affected
Scan your dependencies to see if this vulnerability affects your projects.
Scan Your Dependencies