PYMYSQL · CVE-2024-36039 · Package
FIX → 1.1.1
PyMySQL's escape_dict function does not escape dictionary keys, so JSON input used as keys in a query can carry SQL. An attacker who controls that JSON can inject SQL and read or change database data.
first public May 21, 2024 · 2 sources
Check it with your coding agent
It reads this page and tells you if your code or app is affected.
Applications that use PyMySQL and build SQL from dictionary keys that come from untrusted JSON are exposed. Apps that only pass fixed keys or trusted data can skip the change, but upgrading to 1.1.1 is still the stated fix.
Not affected if no-json-keys-in-sql, trusted-input-only
Who cares mysql, pymysql, python
pip show pymysql; versions below 1.1.1 are affected.escape_dict or dict-based query parameters built from JSON input that is not trusted.Upgrade to 1.1.1
pymysql (pypi): move to 1.1.1.PyMySQL through 1.1.0 allows SQL injection if used with untrusted JSON input because keys are not escaped by escape_dict.
This page as .md · .json · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHub Advisory Database, CC-BY 4.0. Posts quoted belong to their authors.
Are you affected?
Ask from here. InfraStack checks the affected versions against your stack and answers in your inbox.
InfraStack checks the affected versions against your stack and answers in Slack, with the evidence and the fix.
InfraStack checks it against your stack and answers on your report, with the evidence and the fix.