PT-2024-10474 · Pypi+4 · Sqlparse+4
Uriya Yavnieli
·
Published
2024-04-15
·
Updated
2025-01-21
·
CVE-2024-4340
CVSS v2.0
7.8
High
| Vector | AV:N/AC:L/Au:N/C:N/I:N/A:C |
Name of the Vulnerable Software and Affected Versions
sqlparse (affected versions not specified)
Description
The issue is related to the sqlparse.parse() function, which can lead to a Denial of Service due to a RecursionError when processing a heavily nested list. This can be exploited by a remote attacker to cause a denial of service. The impact depends on the use of the sqlparse.parse() function, and anyone parsing user input with this function is affected.
Recommendations
At the moment, there is no information about a newer version that contains a fix for this vulnerability. As a temporary workaround, consider limiting the recursion depth in the flatten() function of the TokenList class to prevent excessive recursion. For example, you can modify the function to raise an error when a maximum depth is reached.
DoS
Uncontrolled Recursion
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Linuxmint
Red Os
Suse
Ubuntu
Sqlparse