Update dependency starlette to ^0.40.0 [SECURITY] #316
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.
This PR contains the following updates:
^0.38.0
->^0.40.0
GitHub Vulnerability Alerts
CVE-2024-47874
Summary
Starlette treats
multipart/form-data
parts without afilename
as text form fields and buffers those in byte strings with no size limit. This allows an attacker to upload arbitrary large form fields and cause Starlette to both slow down significantly due to excessive memory allocations and copy operations, and also consume more and more memory until the server starts swapping and grinds to a halt, or the OS terminates the server process with an OOM error. Uploading multiple such requests in parallel may be enough to render a service practically unusable, even if reasonable request size limits are enforced by a reverse proxy in front of Starlette.PoC
curl http://localhost:8000 -F 'big=</dev/urandom'
Impact
This Denial of service (DoS) vulnerability affects all applications built with Starlette (or FastAPI) accepting form requests.
Release Notes
encode/starlette (starlette)
v0.40.0
: Version 0.40.0Compare Source
This release fixes a Denial of service (DoS) via
multipart/form-data
requests.You can view the full security advisory:
GHSA-f96h-pmfr-66vw
Fixed
max_part_size
toMultiPartParser
to limit the size of parts inmultipart/form-data
requests fd038f3.
v0.39.2
: Version 0.39.2Compare Source
Fixed
request.url_for
when only "app" scope is available #2672.python-multipart==0.0.12
#2708.Full Changelog: encode/starlette@0.39.1...0.39.2
v0.39.1
: Version 0.39.1Compare Source
Fixed
responses.py
andschemas.py
#2700.get_route_path
by removing regular expression usage #2701.FileResponse.chunk_size
when handling multiple ranges #2703.token_hex
for generating multipart boundary strings #2702.Full Changelog: encode/starlette@0.39.0...0.39.1
v0.39.0
: Version 0.39.0Compare Source
Added
FileResponse
#2697Full Changelog: encode/starlette@0.38.6...0.39.0
v0.38.6
: Version 0.38.6Compare Source
Fixed
MemoryObjectReceiveStream
inTestClient
#2693.Full Changelog: encode/starlette@0.38.5...0.38.6
v0.38.5
: Version 0.38.5Compare Source
Fixed
BackgroundTasks
from withinBaseHTTPMiddleware
#2688.This behavior was removed in 0.38.3, and is now restored.
Full Changelog: encode/starlette@0.38.4...0.38.5
v0.38.4
: Version 0.38.4Compare Source
Fixed
root_path
removal inget_route_path
function #2600Full Changelog: encode/starlette@0.38.3...0.38.4
v0.38.3
: Version 0.38.3Compare Source
Added
Fixed
BaseHTTPMiddleware
viaStreamingResponse
#2620.Full Changelog: encode/starlette@0.38.2...0.38.3
v0.38.2
: Version 0.38.2Compare Source
Fixed
routing.get_name()
not to assume all routines have__name__
#2648Full Changelog: encode/starlette@0.38.1...0.38.2
v0.38.1
: Version 0.38.1Compare Source
Removed
Full Changelog: encode/starlette@0.38.0...0.38.1
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 is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.