Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Snyk: Med] werkzeug Inefficient Algorithmic Complexity (Due 12/31/23) #5636

Closed
1 of 3 tasks
cnlucas opened this issue Nov 1, 2023 · 1 comment
Closed
1 of 3 tasks
Assignees
Labels
Security: general General security concern or issue Security: moderate Remediate within 60 days
Milestone

Comments

@cnlucas
Copy link
Member

cnlucas commented Nov 1, 2023

Introduced through
werkzeug@2.2.3, flask@2.2.5 and others
Fixed in
werkzeug@3.0.1

Exploit maturity
No known exploit

Detailed paths and remediation

Introduced through: project@0.0.0 › werkzeug@2.2.3
Fix: Upgrade werkzeug to version 3.0.1

Introduced through: project@0.0.0 › flask@2.2.5 › werkzeug@2.2.3
Fix: Pin werkzeug to version 3.0.1
Introduced through: project@0.0.0 › flask-apispec@0.11.4 › flask@2.2.5 › werkzeug@2.2.3
Fix: Pin werkzeug to version 3.0.1

…and 3 more
Security information
Factors contributing to the scoring:

Snyk: [CVSS 6.5](https://security.snyk.io/vuln/SNYK-PYTHON-WERKZEUG-6035177) - Medium Severity
NVD: Not available. NVD has not yet published its analysis.

Why are the scores different? Learn how Snyk evaluates vulnerability scores
Overview

Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity in multipart data parsing. An attacker can cause a denial of service and block worker processes from handling legitimate requests by sending crafted multipart data to an endpoint that will parse it, eventually exhausting or killing all available workers.

Exploiting this vulnerability is possible if the uploaded file starts with CR or LF and is followed by megabytes of data without these characters.

Action items:

  • Verify this is still a vulnerability, or update ticket to reflect this is not an issue and close
  • Address by pinning werkzeug to version 3.0.1

Completion criteria:

  • Vulnerability no longer appearing in snyk
@cnlucas cnlucas added Security: moderate Remediate within 60 days Security: general General security concern or issue labels Nov 1, 2023
@cnlucas cnlucas added this to the Sprint 23.4 milestone Nov 1, 2023
@cnlucas cnlucas mentioned this issue Nov 1, 2023
2 tasks
@cnlucas cnlucas mentioned this issue Nov 8, 2023
3 tasks
@pkfec pkfec mentioned this issue Nov 15, 2023
2 tasks
@cnlucas cnlucas mentioned this issue Nov 22, 2023
3 tasks
This was referenced Nov 29, 2023
@rfultz rfultz modified the milestones: Sprint 23.4, Sprint 23.5 Dec 12, 2023
@cnlucas cnlucas mentioned this issue Dec 13, 2023
2 tasks
@cnlucas cnlucas mentioned this issue Dec 20, 2023
3 tasks
@pkfec
Copy link
Contributor

pkfec commented Dec 21, 2023

With current werkzeug version 2.2.3 upload and download functionality work OK. We don't support uploading/downloading files that start with CL and LR. Big change in werkzeug version 2.3: Passing bytes is deprecated and support will be removed in Werkzeug 3.0.

I recently updated Werkzeug to version 2.3.0 and observed that the functionality for uploading legal documents to Elasticsearch is functioning properly. However, I encountered an issue in the downloads and download task process where the query string is being encoded/decoded into a bytestring. It's worth noting that Werkzeug no longer supports byte conversion starting from version 2.3 onwards.

For now i am going to ignore this vulnerability in snyk (for 90 days) while we research how to upgrade werkzeug without impacting the downloads and download task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Security: general General security concern or issue Security: moderate Remediate within 60 days
Projects
Archived in project
Development

No branches or pull requests

3 participants