Commit d2acdc7
authored
fix(deps): pin starlette>=1.0.1 to fix BadHost (CVE-2026-48710) (#438)
## Summary
Remediates **BadHost**
([CVE-2026-48710](GHSA-86qp-5c8j-p5mr)), a
Host-header path-confusion vulnerability in **Starlette ≤ 1.0.0** that
can bypass path-based authorization. The fix lives in **Starlette
1.0.1**.
FastAPI does **not** cap Starlette (even latest `0.136.3` only requires
`starlette>=0.46.0`), so bumping FastAPI alone does not guarantee a
fixed Starlette, and an explicit floor is required. `nc_py_api` also
imports `starlette` directly (`_session.py`,
`ex_app/integration_fastapi.py`), so declaring it is correct regardless.
## Changes
- **`pyproject.toml`**
- add `starlette>=1.0.1` (the BadHost fix)
- raise `fastapi>=0.133` (the first FastAPI release compatible with
Starlette 1.0+)
- **`CHANGELOG.md`**: `0.30.2` section:
- `Security`: the BadHost pin
- `Changed`: `download_directory_as_zip` archive entry order is no
longer guaranteed (server-side, per nextcloud/server#60225)
The version bump (`_version.py` to `0.30.2`) is intentionally
**omitted** here; it lands in the `[publish]` commit on `main` after
merge.
## Compatibility
- Keeps Python `>=3.10` (FastAPI 0.133+ and Starlette 1.x both require
`>=3.10`).
- Verified: under these constraints pip upgrades the vulnerable
Starlette from `1.0.0` to `1.2.1`; `import nc_py_api` succeeds.1 parent 0b35fe0 commit d2acdc7
2 files changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
5 | 15 | | |
6 | 16 | | |
7 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
0 commit comments