Описание
sqlparse is a non-validating SQL parser module for Python. In sqlparse versions 0.4.0 and 0.4.1 there is a regular Expression Denial of Service in sqlparse vulnerability. The regular expression may cause exponential backtracking on strings containing many repetitions of '\r\n' in SQL comments. Only the formatting feature that removes comments from SQL statements is affected by this regular expression. As a workaround don't use the sqlformat.format function with keyword strip_comments=True or the --strip-comments command line flag when using the sqlformat command line tool. The issues has been fixed in sqlparse 0.4.2.
A resource-consumption flaw was found in python-sqlparse. The formatter function that strips comments from SQL contains a regular expression that is vulnerable to Regular Expression Denial of Service (ReDoS). A network attacker could craft an SQL comment containing numerous repetitions of '\r\n' that could cause exponential backtracking and cause the system to hang.
Меры по смягчению последствий
As mitigation, don't use the sqlformat.format function with keyword strip_comments=True or the --strip-comments command line flag when using the sqlformat command line tool.
Затронутые пакеты
| Платформа | Пакет | Состояние | Рекомендация | Релиз |
|---|---|---|---|---|
| Red Hat Ansible Automation Platform 1.2 | python-sqlparse | Affected | ||
| Red Hat Ansible Automation Platform 1.2 | sqlparse | Affected | ||
| Red Hat Ansible Tower 3 | sqlparse | Out of support scope | ||
| Red Hat OpenStack Platform 10 (Newton) | python-sqlparse | Out of support scope | ||
| Red Hat OpenStack Platform 13 (Queens) | python-sqlparse | Out of support scope | ||
| Red Hat OpenStack Platform 16.1 | python-sqlparse | Not affected | ||
| Red Hat OpenStack Platform 16.2 | python-sqlparse | Not affected | ||
| Red Hat Satellite 6.11 for RHEL 8 | python-sqlparse | Fixed | RHSA-2022:5498 | 05.07.2022 |
| Red Hat Satellite 6.11 for RHEL 8 | python-sqlparse | Fixed | RHSA-2022:5498 | 05.07.2022 |
Показывать по
Дополнительная информация
Статус:
7.5 High
CVSS3
Связанные уязвимости
sqlparse is a non-validating SQL parser module for Python. In sqlparse versions 0.4.0 and 0.4.1 there is a regular Expression Denial of Service in sqlparse vulnerability. The regular expression may cause exponential backtracking on strings containing many repetitions of '\r\n' in SQL comments. Only the formatting feature that removes comments from SQL statements is affected by this regular expression. As a workaround don't use the sqlformat.format function with keyword strip_comments=True or the --strip-comments command line flag when using the sqlformat command line tool. The issues has been fixed in sqlparse 0.4.2.
sqlparse is a non-validating SQL parser module for Python. In sqlparse versions 0.4.0 and 0.4.1 there is a regular Expression Denial of Service in sqlparse vulnerability. The regular expression may cause exponential backtracking on strings containing many repetitions of '\r\n' in SQL comments. Only the formatting feature that removes comments from SQL statements is affected by this regular expression. As a workaround don't use the sqlformat.format function with keyword strip_comments=True or the --strip-comments command line flag when using the sqlformat command line tool. The issues has been fixed in sqlparse 0.4.2.
sqlparse is a non-validating SQL parser module for Python. In sqlparse ...
7.5 High
CVSS3