Skip to content

build: bump fastapi + pin starlette>=1.3.1 to fix CVE-2025-62727 (DoS via FileResponse) - #500

Merged
remsky merged 1 commit into
remsky:masterfrom
bunlongheng:fix/bump-fastapi-starlette-cves
Aug 7, 2026
Merged

build: bump fastapi + pin starlette>=1.3.1 to fix CVE-2025-62727 (DoS via FileResponse)#500
remsky merged 1 commit into
remsky:masterfrom
bunlongheng:fix/bump-fastapi-starlette-cves

Conversation

@bunlongheng

Copy link
Copy Markdown
Contributor

Summary

Starlette 0.47.3 (the version resolved by the current fastapi==0.116.1 pin's <0.48 upper cap) carries CVE-2025-62727 - a quadratic-time Range-header parser in FileResponse that lets an unauthenticated client exhaust CPU with a single crafted request. Since Kokoro-FastAPI serves audio files via FileResponse on public endpoints, this is directly reachable without any authentication.

Related starlette advisories also fixed in 1.3.x:

Fix

  • Bump fastapi to latest (removes the starlette <0.48 upper bound)
  • Floor starlette>=1.3.1 explicitly so the lock always resolves a patched version
  • Remove the TODO comment that tracked this exact situation

The pyproject already contained a comment noting this pin should be dropped when fastapi released past 0.116 - this PR closes that loop.

References

  • CVE-2025-62727 - starlette FileResponse DoS
  • starlette changelog 0.49.1, 1.0.1, 1.1.0, 1.3.x

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).
@RBEmerson970

Copy link
Copy Markdown

Will this be applied to feat/multi-speaker branch, too?

@remsky
remsky merged commit 3eaa0c0 into remsky:master Aug 7, 2026
2 checks passed
@remsky

remsky commented Aug 7, 2026

Copy link
Copy Markdown
Owner

@RBEmerson970

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.

CVE What it is Fixed in Kokoro
CVE-2026-48710 Host header poisons request.url.path, bypasses path-based auth 1.0.1 N/A. Zero request.url uses in api/src, and no auth middleware to bypass
CVE-2026-48817 Arbitrary HTTP method dispatched to HTTPEndpoint attrs via getattr 1.1.0 N/A. No HTTPEndpoint, all routers are function-based
CVE-2026-48818 UNC path in StaticFiles on Windows leaks NTLMv2 hash 1.1.0 N/A. /web/ serves files through its own _find_file, which rejects UNC on the prefix check before realpath
CVE-2026-54282 Path not starting with / poisons request.url.hostname 1.3.0 N/A. Nothing reads request.url.hostname here
CVE-2026-54283 form() limits ignored for urlencoded bodies, DoS 1.3.1 N/A. All endpoints take JSON

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants