-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Update extension.py to clean request.path before logging it #351
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Confirmed that the exploit PoC is resolved with this patch |
noirbee
reviewed
May 2, 2024
Thank you very much for the contribution and fixing this issue. |
emmeowzing
referenced
this pull request
in premiscale/premiscale
Jun 1, 2024
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [flask-cors](https://github.com/corydolphin/flask-cors) | `==3.0.10` -> `==4.0.1` | [![age](https://developer.mend.io/api/mc/badges/age/pypi/flask-cors/4.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/flask-cors/4.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/flask-cors/3.0.10/4.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/flask-cors/3.0.10/4.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. ### GitHub Vulnerability Alerts #### [CVE-2024-1681](https://nvd.nist.gov/vuln/detail/CVE-2024-1681) corydolphin/flask-cors is vulnerable to log injection when the log level is set to debug. An attacker can inject fake log entries into the log file by sending a specially crafted GET request containing a CRLF sequence in the request path. This vulnerability allows attackers to corrupt log files, potentially covering tracks of other attacks, confusing log post-processing tools, and forging log entries. The issue is due to improper output neutralization for logs. --- ### Release Notes <details> <summary>corydolphin/flask-cors (flask-cors)</summary> ### [`v4.0.1`](https://github.com/corydolphin/flask-cors/blob/HEAD/CHANGELOG.md#401) [Compare Source](https://github.com/corydolphin/flask-cors/compare/4.0.0...4.0.1) ##### Security - Address [CVE-2024-1681](https://github.com/advisories/GHSA-84pr-m4jr-85g5) which is a log injection vulnerability when the log level is set to debug by [@​aneshujevic](https://github.com/aneshujevic) in [https://github.com/corydolphin/flask-cors/pull/351](https://github.com/corydolphin/flask-cors/pull/351) ### [`v4.0.0`](https://github.com/corydolphin/flask-cors/blob/HEAD/CHANGELOG.md#400) [Compare Source](https://github.com/corydolphin/flask-cors/compare/3.0.10...4.0.0) - Remove support for Python versions older than 3.8 by [@​WAKayser](https://github.com/WAKayser) in [https://github.com/corydolphin/flask-cors/pull/330](https://github.com/corydolphin/flask-cors/pull/330) - Add GHA tooling by [@​corydolphin](https://github.com/corydolphin) in [https://github.com/corydolphin/flask-cors/pull/331](https://github.com/corydolphin/flask-cors/pull/331) </details> --- ### 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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/premiscale/premiscale). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNDAuMTAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6W119-->
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @corydolphin
In this PR I've used Python's repr method to escape special characters and print them as ordinary characters as a bugfix for CVE-2024-1681 - https://nvd.nist.gov/vuln/detail/CVE-2024-1681.
This should resolve #349.