build: bump fastapi + pin starlette>=1.3.1 to fix CVE-2025-62727 (DoS via FileResponse) - #500
Merged
Conversation
Starlette 0.47.3 (resolved by fastapi==0.116.1's <0.48 cap) has CVE-2025-62727: quadratic Range-header parsing in FileResponse enables unauthenticated DoS. This service serves audio via FileResponse, making it directly reachable. Bump fastapi to latest and floor starlette at >=1.3.1 (patched).
|
Will this be applied to feat/multi-speaker branch, too? |
Owner
|
Yep, I'll bump it, and it would get it when it merges to master. If you're running this locally it's not likely to cause any concern anyhow; moreso for people who do use this for web deployments to sleep easier.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Starlette 0.47.3 (the version resolved by the current
fastapi==0.116.1pin's<0.48upper cap) carries CVE-2025-62727 - a quadratic-time Range-header parser inFileResponsethat lets an unauthenticated client exhaust CPU with a single crafted request. Since Kokoro-FastAPI serves audio files viaFileResponseon public endpoints, this is directly reachable without any authentication.Related starlette advisories also fixed in 1.3.x:
request.urlrequest.url+form()limits bypassFix
fastapito latest (removes the starlette<0.48upper bound)starlette>=1.3.1explicitly so the lock always resolves a patched versionThe pyproject already contained a comment noting this pin should be dropped when fastapi released past 0.116 - this PR closes that loop.
References