{"id":"UBUNTU-CVE-2024-36039","details":"PyMySQL through 1.1.0 allows SQL injection if used with untrusted JSON input because keys are not escaped by escape_dict.","modified":"2026-02-04T04:31:55.629509Z","published":"2024-05-21T16:15:00Z","related":["USN-6801-1"],"upstream":["CVE-2024-36039"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2024-36039"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2024-36039"},{"type":"REPORT","url":"https://github.com/PyMySQL/PyMySQL/releases/tag/v1.1.1"},{"type":"REPORT","url":"https://github.com/advisories/GHSA-v9hf-5j83-6xpp"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-6801-1"}],"affected":[{"package":{"name":"python-pymysql","ecosystem":"Ubuntu:16.04:LTS","purl":"pkg:deb/ubuntu/python-pymysql@0.7.2-1ubuntu1?arch=source&distro=xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.6.2-2","0.7.2-1","0.7.2-1ubuntu1"],"ecosystem_specific":{"binaries":[{"binary_name":"python-pymysql","binary_version":"0.7.2-1ubuntu1"},{"binary_name":"python3-pymysql","binary_version":"0.7.2-1ubuntu1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-36039.json"}},{"package":{"name":"python-pymysql","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/python-pymysql@0.8.0-1?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.7.11-1","0.8.0-1"],"ecosystem_specific":{"binaries":[{"binary_name":"python-pymysql","binary_version":"0.8.0-1"},{"binary_name":"python3-pymysql","binary_version":"0.8.0-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-36039.json"}},{"package":{"name":"python-pymysql","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/python-pymysql@0.9.3-2ubuntu3.1?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.9.3-2ubuntu3.1"}]}],"versions":["0.9.3-1","0.9.3-2ubuntu1","0.9.3-2ubuntu3"],"ecosystem_specific":{"binaries":[{"binary_name":"python3-pymysql","binary_version":"0.9.3-2ubuntu3.1"}],"availability":"No subscription required"},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-36039.json"}},{"package":{"name":"python-pymysql","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/python-pymysql@1.0.2-1ubuntu1.22.04.1?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.2-1ubuntu1.22.04.1"}]}],"versions":["1.0.2-1ubuntu1"],"ecosystem_specific":{"binaries":[{"binary_name":"python3-pymysql","binary_version":"1.0.2-1ubuntu1.22.04.1"}],"availability":"No subscription required"},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-36039.json"}},{"package":{"name":"python-pymysql","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/python-pymysql@1.0.2-2ubuntu1.1?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.2-2ubuntu1.1"}]}],"versions":["1.0.2-1ubuntu1","1.0.2-2ubuntu1"],"ecosystem_specific":{"binaries":[{"binary_name":"python3-pymysql","binary_version":"1.0.2-2ubuntu1.1"}],"availability":"No subscription required"},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-36039.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L"},{"type":"Ubuntu","score":"medium"}]}