-
Notifications
You must be signed in to change notification settings - Fork 8
Update dependency starlette to v0.47.2 [SECURITY] #22
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
base: main
Are you sure you want to change the base?
Conversation
Hold off merging because My thoughts here:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment here: #22 (comment)
created label |
Agreed on your comment regarding the I can look into the grouping of the PRs this week since I am now back from PTO @thepetk |
Ideally I think I would prefer to have a status that confirms that config.env is there when a new image is added (the PR that adds the new image). But I guess this might be too complex / not so much needed. So we could consider |
I like that idea and don't think it'd be difficult to implement, I'll take a look at implementing that alongside the PR grouping :) |
11b2f32
to
11dda4e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
I like the new grouping btw. Seems nice |
11dda4e
to
d35bed0
Compare
d35bed0
to
3494e80
Compare
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
3494e80
to
10c69cb
Compare
This PR contains the following updates:
==0.37.2
->==0.47.2
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.
CVE-2025-54121
Summary
When parsing a multi-part form with large files (greater than the default max spool size)
starlette
will block the main thread to roll the file over to disk. This blocks the event thread which means we can't accept new connections.Details
Please see this discussion for details: https://github.com/encode/starlette/discussions/2927#discussioncomment-13721403. In summary the following UploadFile code (copied from here) has a minor bug. Instead of just checking for
self._in_memory
we should also check if the additional bytes will cause a rollover.I have already created a PR which fixes the problem: https://github.com/encode/starlette/pull/2962
PoC
See the discussion here for steps on how to reproduce.
Impact
To be honest, very low and not many users will be impacted. Parsing large forms is already CPU intensive so the additional IO block doesn't slow down
starlette
that much on systems with modern HDDs/SSDs. If someone is running on tape they might see a greater impact.Starlette Denial of service (DoS) via multipart/form-data
CVE-2024-47874 / GHSA-f96h-pmfr-66vw
More information
Details
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.
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
References
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Starlette has possible denial-of-service vector when parsing large files in multipart forms
CVE-2025-54121 / GHSA-2c2j-9gv5-cj73
More information
Details
Summary
When parsing a multi-part form with large files (greater than the default max spool size)
starlette
will block the main thread to roll the file over to disk. This blocks the event thread which means we can't accept new connections.Details
Please see this discussion for details: https://github.com/encode/starlette/discussions/2927#discussioncomment-13721403. In summary the following UploadFile code (copied from here) has a minor bug. Instead of just checking for
self._in_memory
we should also check if the additional bytes will cause a rollover.I have already created a PR which fixes the problem: https://github.com/encode/starlette/pull/2962
PoC
See the discussion here for steps on how to reproduce.
Impact
To be honest, very low and not many users will be impacted. Parsing large forms is already CPU intensive so the additional IO block doesn't slow down
starlette
that much on systems with modern HDDs/SSDs. If someone is running on tape they might see a greater impact.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
References
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Release Notes
Kludex/starlette (starlette)
v0.47.2
Compare Source
Fixed
UploadFile
check for future rollover #2962.New Contributors
Full Changelog: Kludex/starlette@0.47.1...0.47.2
v0.47.1
: Version 0.47.1Compare Source
Fixed
Self
inTestClient.__enter__
#2951Full Changelog: Kludex/starlette@0.47.0...0.47.1
v0.47.0
: Version 0.47.0Compare Source
Added
pathsend
extension #2671.partitioned
attribute toResponse.set_cookie
#2501.Changed
methods
parameter type fromlist[str]
toCollection[str]
#2903.import typing
byfrom typing import ...
in the whole codebase #2867.Fixed
ExceptionMiddleware.http_exception
as async to prevent thread creation #2922.New Contributors
Full Changelog: Kludex/starlette@0.46.2...0.47.0
v0.46.2
: Version 0.46.2Compare Source
What's Changed
TemplateResponse
by @alex-oleshkevich in encode#2909BaseHTTPMiddleware
by @ramannanda9 in encode#2911New Contributors
Full Changelog: Kludex/starlette@0.46.1...0.46.2
v0.46.1
: Version 0.46.1Compare Source
Fixed
follow_symlinks=True
#2896.Full Changelog: Kludex/starlette@0.46.0...0.46.1
v0.46.0
: Version 0.46.0Compare Source
Added
GZipMiddleware
: Make sureVary
header is always added if a response can be compressed #2865.Fixed
GZipMiddleware
: Don't compress on server sent events #2871.Changed
MultiPartParser
: Renamemax_file_size
tospool_max_size
#2780.Deprecated
TestClient(timeout=...)
#2840.New Contributors
Full Changelog: Kludex/starlette@0.45.3...0.46.0
v0.45.3
: Version 0.45.3Compare Source
Fixed
lookup_path
on commonpath comparison by @Kludex in encode#2851Full Changelog: Kludex/starlette@0.45.2...0.45.3
v0.45.2
: Version 0.45.2Compare Source
Fixed
create_memory_object_stream
compatible with old anyio versions once again, and bump anyio minimum version to 3.6.2 by @graingert in #2833.Full Changelog: Kludex/starlette@0.45.1...0.45.2
v0.45.1
: Version 0.45.1Compare Source
Fixed
MemoryObjectReceiveStream
upon exception inBaseHTTPMiddleware
children by @Kludex in encode#2813Refactor
Full Changelog: Kludex/starlette@0.45.0...0.45.1
v0.45.0
: Version 0.45.0Compare Source
Removed
ExceptionMiddleware
import proxy fromstarlette.exceptions
module by @Kludex in encode#2826WS_1004_NO_STATUS_RCVD
andWS_1005_ABNORMAL_CLOSURE
by @Kludex in encode#2827Full Changelog: Kludex/starlette@0.44.0...0.45.0
v0.44.0
: Version 0.44.0Compare Source
Added
max_part_size
parameter toRequest.form()
by @iudeen in encode#2815client
parameter toTestClient
by @iudeen in encode#2810New Contributors
Full Changelog: Kludex/starlette@0.43.0...0.44.0
v0.43.0
: Version 0.43.0Compare Source
Removed
allow_redirects
argument fromTestClient
#2808.Added
New Contributors
Full Changelog: Kludex/starlette@0.42.0...0.43.0
v0.42.0
: Version 0.42.0Compare Source
Added
ClientDisconnect
onStreamingResponse
#2732.Fixed
StaticFiles
whenfollow_symlinks=True
#2711.python-multipart
version to0.0.18
0ba8395.httpx
version to0.27.0
#2773.New Contributors
Full Changelog: Kludex/starlette@0.41.3...0.42.0
v0.41.3
: Version 0.41.3Compare Source
Fixed
scope[raw_path]
on theTestClient
#2716.dict
byMapping
onHTTPException.headers
#2749.Full Changelog: Kludex/starlette@0.41.2...0.41.3
v0.41.2
: Version 0.41.2Compare Source
What's Changed
python-multipart
by @Kludex in encode#2737Full Changelog: Kludex/starlette@0.41.1...0.41.2
v0.41.1
: Version 0.41.1Compare Source
What's Changed
python-multipart
import topython_multipart
by @Kludex in encode#2733python-multipart
version to 0.0.13 by @Kludex in encode#2734Full Changelog: Kludex/starlette@0.41.0...0.41.1
v0.41.0
: Version 0.41.0Compare Source
Added
HTTPException
beforewebsocket.accept()
encode#2725v0.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: Kludex/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: Kludex/starlette@0.39.0...0.39.1
v0.39.0
: Version 0.39.0Compare Source
Added
FileResponse
#2697Full Changelog: Kludex/starlette@0.38.6...0.39.0
v0.38.6
: Version 0.38.6Compare Source
Fixed
MemoryObjectReceiveStream
inTestClient
#2693.Full Changelog: Kludex/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: Kludex/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: Kludex/starlette@0.38.3...0.38.4
v0.38.3
: Version 0.38.3Compare Source
Added
Fixed
BaseHTTPMiddleware
viaStreamingResponse
#2620.Full Changelog: Kludex/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: Kludex/starlette@0.38.1...0.38.2
v0.38.1
: Version 0.38.1Compare Source
Removed
Full Changelog: Kludex/starlette@0.38.0...0.38.1
v0.38.0
: Version 0.38.0Compare Source
Added
memoryview
inStreamingResponse
andResponse
#2576and #2577.
StaticFiles
#2583.Changed
Jinja2Template
instantiation parameters #2568.Fixed
WebSocketTestSession
#2597.Full Changelog: Kludex/starlette@0.37.2...0.38.0
Configuration
📅 Schedule: Branch creation - "" in timezone America/Toronto, 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.
This PR was generated by Mend Renovate. View the repository job log.