Bug 2282821 (CVE-2024-36039) - CVE-2024-36039 python-pymysql: SQL injection if used with untrusted JSON input
Summary: CVE-2024-36039 python-pymysql: SQL injection if used with untrusted JSON input
Keywords:
Status: NEW
Alias: CVE-2024-36039
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2282822 2282823 2292655
Blocks: 2282826
TreeView+ depends on / blocked
 
Reported: 2024-05-23 05:06 UTC by TEJ RATHI
Modified: 2024-07-02 15:24 UTC (History)
6 users (show)

Fixed In Version: pymysql 1.1.1
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in PyMySQL. When processing untrusted JSON input, keys are not escaped by the escape_dict function due to insufficient input sanitization, allowing an attacker to inject malicious SQL queries.
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2024:4244 0 None None None 2024-07-02 15:24:24 UTC
Red Hat Product Errata RHSA-2024:4245 0 None None None 2024-07-02 15:24:29 UTC

Description TEJ RATHI 2024-05-23 05:06:44 UTC
PyMySQL through 1.1.0 allows SQL injection if used with untrusted JSON input because keys are not escaped by escape_dict.

Reference:
https://github.com/advisories/GHSA-v9hf-5j83-6xpp

Upstream patch:
https://github.com/PyMySQL/PyMySQL/commit/521e40050cb386a499f68f483fefd144c493053c

Comment 1 TEJ RATHI 2024-05-23 05:09:19 UTC
Created python-PyMySQL tracking bugs for this issue:

Affects: fedora-all [bug 2282822]

Comment 10 Guilherme de Almeida Suckevicz 2024-06-17 13:56:13 UTC
Created python-PyMySQL tracking bugs for this issue:

Affects: epel-7 [bug 2292655]

Comment 11 errata-xmlrpc 2024-07-02 15:24:22 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2024:4244 https://access.redhat.com/errata/RHSA-2024:4244

Comment 12 errata-xmlrpc 2024-07-02 15:24:27 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2024:4245 https://access.redhat.com/errata/RHSA-2024:4245


Note You need to log in before you can comment on or make changes to this bug.