fix: address Dependabot CVEs — starlette 1.3.1, pyjwt 2.13.0, fastapi 0.137.1#81
Merged
Conversation
- fastapi: ^0.128.0 → >=0.128.0, resolves to 0.137.1 (removes starlette upper bound) - starlette (examples): >=0.49.1,<0.50.0 → >=1.3.1, resolves to 1.3.1 - pyjwt: add explicit >=2.13.0 floor (transitive dep from redis), resolves to 2.13.0 Starlette CVEs addressed: DoS via form/multipart/Range, SSRF via UNC paths, host header bypass, path poisoning, getattr dispatch (#7, #8, #19, #25, #26, #27, #28) PyJWT CVEs addressed: token forgery, crit header bypass, SSRF via file:// schemes, DoS via Base64URL decoding, algorithm allow-list bypass, unbounded JWKS requests (#10, #20, #21, #22, #23, #24) All 242 tests pass. black and mypy clean.
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
Addresses 13 open Dependabot security alerts by bumping three dependencies.
Changes
starlette(examples)>=0.49.1,<0.50.0→>=1.3.1fastapi(main)^0.128.0→>=0.128.0pyjwt(main, new explicit dep)>=2.13.0FastAPI's
^0.128.0was silently capping at<0.129.0in Poetry, blocking the starlette upgrade. FastAPI 0.137.1 removed the starlette upper bound, enabling 1.x.PyJWT is a transitive dep of
redis; adding it explicitly as a direct dep floors the minimum to the patched version.Alerts resolved
Starlette (7 alerts):
request.url.hostnamePyJWT (6 alerts):
critheader extensionskidvaluesThe remaining ~10 alerts (urllib3, black, idna, pytest, requests, etc.) are already at their patched versions in the lock file and should auto-dismiss once Dependabot re-evaluates.
Notes
Starlette 1.x emits a
StarletteDeprecationWarningwhenhttpxis used withstarlette.testclient— Starlette now prefershttpx2. This is non-breaking and all 242 tests pass; migrating tohttpx2can be done in a follow-up.Test plan
poetry run black --check genesis/ tests/ examples/— cleanpoetry run mypy— cleanpoetry run pytest tests/— 242 passed, 0 failed