Update dependency starlette to v0.47.2 [SECURITY] #38
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.46.1
->==0.47.2
GitHub Vulnerability Alerts
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.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
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.
This PR was generated by Mend Renovate. View the repository job log.