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

Dependabot Alert: Werkzeug DoS: High resource usage when parsing multipart/form-data containing a large part with CR/LF character at the beginning #160

Open
JennaySDavis opened this issue Jan 5, 2024 · 4 comments

Comments

@JennaySDavis
Copy link

JennaySDavis commented Jan 5, 2024

Severity - Moderate

Werkzeug multipart data parser needs to find a boundary that may be between consecutive chunks. That's why parsing is based on looking for newline characters. Unfortunately, code looking for partial boundary in the buffer is written inefficiently, so if we upload a file that starts with CR or LF and then is followed by megabytes of data without these characters: all of these bytes are appended chunk by chunk into internal bytearray and lookup for boundary is performed on growing buffer.

This allows an attacker to cause a denial of service by sending crafted multipart data to an endpoint that will parse it. The amount of CPU time required can block worker processes from handling legitimate requests. The amount of RAM required can trigger an out of memory kill of the process. If many concurrent requests are sent continuously, this can exhaust or kill all available workers.

@JennaySDavis
Copy link
Author

#160 Acceptance Criteria

Pass/Fail Description
I Pass Hyperlinks are operational
Pass Downloading PDF
Pass Results returned from a search
Pass Various screen sizes display the application properly

Comments/Additional Notes
This testing was a smoke testing of the 889 tool.

ADA Compliance (Automated scan via Chrome Lighthouse)

Criteria Score
Performance 96
Accessibility 100
Best Practices 93

Passed 01/29/2024 - JSD

@LoraBradford
Copy link

@JennaySDavis does the bug on story #185 affect this one also?

@JennaySDavis
Copy link
Author

@LoraBradford the minor issue with aria labels will apply to the entire 889 Tool. See https://github.com/orgs/GSA/projects/116/views/3?pane=issue&itemId=51527311

@LoraBradford
Copy link

@JennaySDavis thank you for the clarification! Moving this to done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants