Advisory

PYSEC-2026-502

Also known as: CVE-2024-36039, GHSA-v9hf-5j83-6xpp

Summary

PyMySQL SQL Injection vulnerability

Details

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

Severity

Critical Basis: CVSS v3 score 9.8, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Dates

Published
2026-06-29 11:50 UTC
Modified
2026-07-01 20:23 UTC

Affected packages and fixes

pymysql

PyPI · All systems

Affected

  • introduced 0, fixed 1.1.1 (ecosystem)

Fixed versions

1.1.1

Fix

  • Fixed version 1.1.1
    pip install --upgrade pymysql==1.1.1

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences