Advisory

GHSA-rrm6-wvj7-cwh2

Also known as: CVE-2023-30608, PYSEC-2023-87

Summary

sqlparse contains a regular expression that is vulnerable to Regular Expression Denial of Service

Details

Impact
The SQL parser contains a regular expression that is vulnerable to ReDoS (Regular Expression Denial of Service). The vulnerability may lead to Denial of Service (DoS).

Patches
This issues has been fixed in sqlparse 0.4.4.

Workarounds
None.

References
This issue was discovered and reported by GHSL team member @erik-krogh (Erik Krogh Kristensen).

  • Commit that introduced the vulnerability: e75e35869473832a1eb67772b1adfee2db11b85a

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2023-04-21 20:24 UTC
Modified
2025-11-04 17:36 UTC

Affected packages and fixes

sqlparse

PyPI · All systems

Affected

  • introduced 0.1.15, fixed 0.4.4 (ecosystem)

Fixed versions

0.4.4

Fix

  • Fixed version 0.4.4
    pip install --upgrade sqlparse==0.4.4

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: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences