Skip to main content
VulnerabilityPublished Updated

CVE-2024-36039: Python pymysql · PyMySQL through 1.1.0 allows SQL injection if used with untrusted JSON input because

Affects python-pymysqlSource GCVE Database

0
Compare
Authoritative record:CVE-2024-36039· Medium 6.3

Not known to be exploited · CVSS 6.3 Medium · fixed in 0.9.3-2ubuntu3.1 : update python-pymysql when convenient.

Data as of 24 Nov 2026, 19:26 UTC

CVSS 3.1 base score
6.3Medium
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 0.9.3-2ubuntu3.1, 1.0.2-1ubuntu1.22.04.1, 1.0.2-2ubuntu1.1
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 21 May 2024

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 23 Nov 2026.

What to do

Upgrade the Ubuntu python-pymysql to 0.9.3-2ubuntu3.1 (package) or 1.0.2-1ubuntu1.22.04.1 (package) or 1.0.2-2ubuntu1.1 (package).

Affected software

ProductAffectedFixed in
Ubuntu 24.04 LTSpython-pymysqlpkg:deb/ubuntu/python-pymysql?arch=source&distro=nobleOther threatsAffected
  • <1.0.2-2ubuntu1.1
Fixed in
  • 1.0.2-2ubuntu1.1
Ubuntu 22.04 LTSpython-pymysqlpkg:deb/ubuntu/python-pymysql?arch=source&distro=jammyOther threatsAffected
  • <1.0.2-1ubuntu1.22.04.1
Fixed in
  • 1.0.2-1ubuntu1.22.04.1
Ubuntu 20.04 LTSpython-pymysqlpkg:deb/ubuntu/python-pymysql?arch=source&distro=focalOther threatsAffected
  • <0.9.3-2ubuntu3.1
Fixed in
  • 0.9.3-2ubuntu3.1
Ubuntu 18.04 LTSpython-pymysqlpkg:deb/ubuntu/python-pymysql?arch=source&distro=bionicOther threatsAffected
  • =0.7.11-1
  • =0.8.0-1
Fixed in–
Ubuntu 16.04 LTSpython-pymysqlpkg:deb/ubuntu/python-pymysql?arch=source&distro=xenialOther threatsAffected
  • =0.6.2-2
  • =0.7.2-1
  • =0.7.2-1ubuntu1
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

Description

PyMySQL through 1.1.0 allows SQL injection if used with untrusted JSON input because keys are not escaped by escape_dict.

References

Community reviews

Loading reviews…