Skip to content

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Mar 7, 2022

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
sqlparse (changelog) ==0.4.1 -> ==0.4.2 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2021-32839

Impact

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.

Patches

The issues has been fixed in sqlparse 0.4.2.

Workarounds

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.

References

This issue was discovered by GitHub team members @​erik-krogh and @​yoff. It was found using a CodeQL query which identifies inefficient regular expressions. You can see the results of the query on python-sqlparse by following this link.

For more information

If you have any questions or comments about this advisory:


Release Notes

andialbrecht/sqlparse

v0.4.2

Compare Source

Notable Changes

  • IMPORTANT: This release fixes a security vulnerability in the
    strip comments filter. In this filter a regular expression that was
    vulnerable to ReDOS (Regular Expression Denial of Service) was
    used. See the security advisory for details: GHSA-p5w8-wqhj-9hhf
    The vulnerability was discovered by @​erik-krogh and @​yoff from
    GitHub Security Lab (GHSL). Thanks for reporting!

Enhancements

  • Add ELSIF as keyword (issue584).
  • Add CONFLICT and ON_ERROR_STOP keywords (pr595, by j-martin).

Bug Fixes

  • Fix parsing of backticks (issue588).
  • Fix parsing of scientific number (issue399).

Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate
Copy link
Author

renovate bot commented Mar 23, 2023

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

Warning: custom changes will be lost.

@renovate renovate bot changed the title Update dependency sqlparse to v0.4.2 [SECURITY] Update dependency sqlparse to v0.4.2 [SECURITY] - abandoned Jan 13, 2024
Copy link
Author

renovate bot commented Jan 13, 2024

Autoclosing Skipped

This PR has been flagged for autoclosing. However, it is being skipped due to the branch being already modified. Please close/delete it manually or report a bug if you think this is in error.

@toddbirchard toddbirchard deleted the renovate/pypi-sqlparse-vulnerability branch January 14, 2024 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants