Vulnerability in starlette (CVE-2023-30798)
Summary
Vulnerability in starlette (CVE-2023-30798). Risk of unauthorized operations or information disclosure. Exploitable via MultipartParser. Mitigation: upgrade to 0.25.0 or later.
Original description
The description as published by the source.
Impact
The MultipartParser using the package python-multipart accepts an unlimited number of multipart parts (form fields or files).
Processing too many parts results in high CPU usage and high memory usage, eventually leading to an OOM process kill.
This can be triggered by sending too many small form fields with no content, or too many empty files.
For this to take effect application code has to:
- Have
python-multipartinstalled and - call
request.form()- or via another framework like FastAPI, using form field parameters or
UploadFileparameters, which in turn callsrequest.form().
- or via another framework like FastAPI, using form field parameters or
Patches
The vulnerability is solved in Starlette 0.25.0 by making the maximum fields and files customizable and with a sensible default (1000).
Applications will be secure by just upgrading their Starlette version to 0.25.0 (or FastAPI to 0.92.0).
If application code needs to customize the new max field and file number, there are new request.form() parameters (with the default values):
max_files=1000max_fields=1000
Workarounds
Applications that don't install python-multipart or that don't use form fields are safe.
In older versions, it's also possible to instead of calling request.form() call request.stream() and parse the form data in internal code.
In most cases, the best solution is to upgrade the Starlette version.
References
This was reported in private by @das7pad via internal email. He also coordinated the fix across multipl…
Source: NIST National Vulnerability Database NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2023-30798 has been found in starlette.
Attackers can target a specific entry point like MultipartParser over the network to misuse the product.
Risk of unauthorized operations or information disclosure. CVSS score: 7.5/10.
What to do: upgrade starlette to 0.25.0 or later.
If unsure, ask your IT team or search "starlette CVE-2023-30798" on the vendor's site.
CVE-2023-30798 (starlette) — CWE-400 / CVSS v3 7.5
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: MultipartParser / UploadFile
Patched: 0.25.0 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
A vulnerability (CWE-400) exists in starlette. Attackers reach the vulnerable code path via MultipartParser without authentication.
Check the vendor advisory for the affected versions of starlette. Attack surface: MultipartParser / UploadFile.
Severity: High (CVSS 7.5/10). Risk of unauthorized operations or information disclosure.
Update to 0.25.0.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'starlette' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'starlette' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
starletteを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade starlette to 0.25.0ステージング環境で 0.25.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
Fix status by distribution
Fixed packages published by each distribution for this CVE
- Debian DEBIAN-CVE-2023-30798 starlette
References
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com
- web vulncheck.com
- web github.com