FastAPI dependency range still allows Starlette versions with published 2025 security advisories #15193
Unanswered
subhashdasyam
asked this question in
Questions
Replies: 1 comment 3 replies
-
|
In some cases people can't upgrade to the latest version of Starlette (due to limitations caused by third-party dependencies), and we would like they still be able to use latest FastAPI possible. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Commit to Help
Example Code
Description
FastAPI
0.135.1still allows Starlette releases that have published GitHubsecurity advisories.
The current dependency floor is:
starlette>=0.46.0That version range still admits:
0.47.10.49.0but GitHub advisories were published for those version ranges:
GHSA-2c2j-9gv5-cj73<0.47.2GHSA-7f5h-v6xp-fcq8<=0.49.0So although a current installation may resolve to a safe Starlette release, the
published FastAPI dependency metadata still permits installation with versions that
fall inside known vulnerable ranges.
Why I think this is LOW
I think this should be classified as LOW, not HIGH, because:
So I do not think this should be framed as "FastAPI itself is directly vulnerable in
all installs".
I do think it is still worth fixing because the package metadata currently allows
users to install combinations that include known-vulnerable Starlette releases.
Why it matters
FastAPI directly exposes and documents the affected Starlette surface:
fastapi.responses.FileResponsefastapi.staticfiles.StaticFilesRelevant files:
fastapi/fastapi/responses.pyfastapi/fastapi/staticfiles.pyfastapi/docs_src/static_files/tutorial001_py310.pyfastapi/docs_src/custom_response/tutorial009_py310.pyThat means users following FastAPI’s public API and examples may rely on the exact
Starlette functionality covered by the advisories, while still having a dependency
range that permits affected Starlette versions.
Expected behavior
I would expect FastAPI to raise the minimum supported Starlette version high enough
to exclude known-vulnerable releases covered by published advisories.
For the currently known 2025 advisory set, that appears to mean at least:
starlette>=0.49.1Actual behavior
FastAPI
0.135.1still publishes:starlette>=0.46.0which permits Starlette releases within advisory-affected ranges.
Local Environment
This local workspace is not itself affected by the dependency-floor issue at runtime.
Versions in the tested environment:
0.135.10.52.13.12.32.12.5So the concern is about the published dependency constraint, not the currently
installed Starlette version here.
Operating System
Linux
Operating System Details
Linux-6.17.9-76061709-generic-x86_64-with-glibc2.39FastAPI Version
0.135.1Pydantic Version
2.12.5
Python Version
3.12.3
Additional Context
Starlette Version
0.52.1locally installed during testingSources:
https://github.com/advisories/GHSA-2c2j-9gv5-cj73https://github.com/advisories/GHSA-7f5h-v6xp-fcq8The main request here is not a code change in FastAPI runtime logic, but a packaging
change so that the minimum Starlette version excludes known vulnerable releases.
Suggested dependency update:
Beta Was this translation helpful? Give feedback.
All reactions