Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 812512 - <dev-python/sqlparse-0.4.2: ReDOS in 'strip comments' filter
Summary: <dev-python/sqlparse-0.4.2: ReDOS in 'strip comments' filter
Status: IN_PROGRESS
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo Security
URL: https://github.com/andialbrecht/sqlpa...
Whiteboard: B3 [glsa?]
Keywords:
Depends on: 812518
Blocks:
  Show dependency tree
 
Reported: 2021-09-11 07:06 UTC by Michał Górny
Modified: 2021-09-12 13:47 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-09-11 07:06:52 UTC
The formatter function that strips comments from a SQL contains a regular expression that is vulnerable to ReDoS (Regular Expression Denial of Service). The regular expression may cause exponential backtracking on strings containing many repetitions of '\r\n' in SQL comments.
Comment 1 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2021-09-11 16:28:26 UTC
Thanks!
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-09-12 07:39:33 UTC
cleanup done