{"answers":{"affected":"3 open source packages ship an affected version, including starlette.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-47874 exists.","fix":"Upgrade starlette to 0.40.0 or later.","what":"CVE-2024-47874 is a high-severity denial of service vulnerability in encode starlette, published on 15 Oct 2024. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-47874 and fix it if it is affected.\n\nWhat it is: CVE-2024-47874 is a high-severity denial of service vulnerability in encode starlette, published on 15 Oct 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-47874 exists.\n\nAffected packages and fixed versions:\n- starlette (PyPI): affected all versions; fixed in 0.40.0\n- starlette (PyPI): affected all versions; fixed in 0.40.0\n- starlette (PyPI): affected all versions; fixed in 0.40.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-47874/ (Markdown: https://insights.sbomify.com/CVE-2024-47874/index.md)","id":"CVE-2024-47874","markdown":"https://insights.sbomify.com/CVE-2024-47874/index.md","name":"CVE-2024-47874","record":{"aliases":["CLSA-2025-1757031156","CVE-2024-12868","DEBIAN-CVE-2024-47874","GHSA-f96h-pmfr-66vw","PYSEC-2026-1943","ROOT-APP-PYPI-CVE-2024-47874","SUSE-SU-2024:3719-1","UBUNTU-CVE-2024-47874","openSUSE-SU-2024:14417-1","openSUSE-SU-2026:11626-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Python ASGI framework","requires_auth":"none","summary":"Attackers can cause denial of service in Starlette applications by sending large multipart form fields, exhausting server memory.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":8.7,"severity":"high","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","version":"4.0"},"cwes":[{"id":"CWE-770","name":"Allocation of Resources Without Limits or Throttling"}],"description":"Starlette is an Asynchronous Server Gateway Interface (ASGI) framework/toolkit. Prior to version 0.40.0, Starlette treats `multipart/form-data` parts without a `filename` as text form fields and buffers those in byte strings with no size limit. This allows an attacker to upload arbitrary large form fields and cause Starlette to both slow down significantly due to excessive memory allocations and copy operations, and also consume more and more memory until the server starts swapping and grinds to a halt, or the OS terminates the server process with an OOM error. Uploading multiple such requests in parallel may be enough to render a service practically unusable, even if reasonable request size limits are enforced by a reverse proxy in front of Starlette. This Denial of service (DoS) vulnerability affects all applications built with Starlette (or FastAPI) accepting form requests. Verison 0.40.0 fixes this issue.","ecosystems":["PyPI","openSUSE:Leap 15.6","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Starlette Denial of service (DoS) via multipart/form-data","id":"CVE-2024-47874","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"denial_of_service","year":"2024"},"n_packages":6,"n_references":2,"next":{"headline":"DOMPurify nesting-based mXSS","id":"CVE-2024-47875"},"packages":[{"ecosystem":"PyPI","fixed":["0.40.0"],"introduced":["0"],"last_affected":[],"package":"starlette","purl":null,"source":"GHSA-f96h-pmfr-66vw"},{"ecosystem":"PyPI","fixed":["0.40.0"],"introduced":["0"],"last_affected":[],"package":"starlette","purl":"pkg:pypi/starlette","source":"GHSA-f96h-pmfr-66vw"},{"ecosystem":"PyPI","fixed":["0.40.0"],"introduced":["0"],"last_affected":[],"package":"starlette","purl":"pkg:pypi/starlette","source":"PYSEC-2026-1943"},{"ecosystem":"openSUSE:Leap 15.6","fixed":["0.35.1-150600.3.3.1"],"introduced":["0"],"last_affected":[],"package":"python-starlette","purl":"pkg:rpm/opensuse/python-starlette\u0026distro=openSUSE%20Leap%2015.6","source":"SUSE-SU-2024:3719-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["0.41.0-1.1"],"introduced":["0"],"last_affected":[],"package":"python-starlette","purl":"pkg:rpm/opensuse/python-starlette\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2024:14417-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["1.6.0-1.1"],"introduced":["0"],"last_affected":[],"package":"python-starlette","purl":"pkg:rpm/opensuse/python-starlette\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2026:11626-1"}],"prev":{"headline":"PhpSpreadsheet XmlScanner bypass leads to XXE","id":"CVE-2024-47873"},"products":["starlette"],"published":"2024-10-15","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"SUSE"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-11-21","vendors":["encode"]},"summary":"Attackers can cause denial of service in Starlette applications by sending large multipart form fields, exhausting server memory.","url":"https://insights.sbomify.com/CVE-2024-47874/"}