{"answers":{"affected":"6 open source packages ship an affected version, including litestar and starlite. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-52581 exists.","fix":"Upgrade litestar to 2.13.0 or later.","what":"CVE-2024-52581 is a high-severity denial of service vulnerability in litestar-org litestar, published on 20 Nov 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-52581 and fix it if it is affected.\n\nWhat it is: CVE-2024-52581 is a high-severity denial of service vulnerability in litestar-org litestar, published on 20 Nov 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-52581 exists.\n\nAffected packages and fixed versions:\n- litestar (PyPI): affected all versions; fixed in 2.13.0\n- litestar (PyPI): affected all versions; fixed in 2.13.0\n- litestar (PyPI): affected all versions; fixed in 2.13.0\n- starlite (PyPI): affected all versions up to 1.51.16; no fix listed\n- starlite (PyPI): affected all versions up to 1.51.16; no fix listed\n- starlite (PyPI): affected all versions up to 1.51.16; no fix listed\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-52581/ (Markdown: https://insights.sbomify.com/CVE-2024-52581/index.md)","id":"CVE-2024-52581","markdown":"https://insights.sbomify.com/CVE-2024-52581/index.md","name":"CVE-2024-52581","record":{"aliases":["GHSA-gjcc-jvgw-wvwj","PYSEC-2024-178","PYSEC-2026-1944"],"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":"An attacker can cause server memory exhaustion and denial of service by sending large multipart form-data requests to applications using the Litestar framework.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"litestar","vendor":"litestar"}],"cvss":{"score":8.2,"severity":"high","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:L","version":"4.0"},"cwes":[{"id":"CWE-770","name":"Allocation of Resources Without Limits or Throttling"}],"description":"Litestar is an Asynchronous Server Gateway Interface (ASGI) framework. Prior to version 2.13.0, the multipart form parser shipped with litestar expects the entire request body as a single byte string and there is no default limit for the total size of the request body. This allows an attacker to upload arbitrary large files wrapped in a `multipart/form-data` request and cause excessive memory consumption on the server. The multipart form parser in affected versions is vulnerable to this type of attack by design. The public method signature as well as its implementation both expect the entire request body to be available as a single byte string. It is not possible to accept large file uploads in a safe way using this parser. This may be a regression, as a variation of this issue was already reported in CVE-2023-25578. Limiting the part number is not sufficient to prevent out-of-memory errors on the server. A patch is available in version 2.13.0.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Litestar allows unbounded resource consumption (DoS vulnerability)","id":"CVE-2024-52581","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"denial_of_service","year":"2024"},"n_packages":6,"n_references":4,"next":{"headline":"cachi2 allows traceback prints locals","id":"CVE-2024-52582"},"packages":[{"ecosystem":"PyPI","fixed":["2.13.0"],"introduced":["0"],"last_affected":[],"package":"litestar","purl":null,"source":"GHSA-gjcc-jvgw-wvwj"},{"ecosystem":"PyPI","fixed":["2.13.0"],"introduced":["0"],"last_affected":[],"package":"litestar","purl":"pkg:pypi/litestar","source":"GHSA-gjcc-jvgw-wvwj"},{"ecosystem":"PyPI","fixed":["2.13.0"],"introduced":["0"],"last_affected":[],"package":"litestar","purl":"pkg:pypi/litestar","source":"PYSEC-2024-178"},{"ecosystem":"PyPI","fixed":[],"introduced":["0"],"last_affected":["1.51.16"],"package":"starlite","purl":null,"source":"GHSA-gjcc-jvgw-wvwj"},{"ecosystem":"PyPI","fixed":[],"introduced":["0"],"last_affected":["1.51.16"],"package":"starlite","purl":"pkg:pypi/starlite","source":"GHSA-gjcc-jvgw-wvwj"},{"ecosystem":"PyPI","fixed":[],"introduced":["0"],"last_affected":["1.51.16"],"package":"starlite","purl":"pkg:pypi/starlite","source":"PYSEC-2026-1944"}],"prev":{"headline":"Server-Side Request Forgery vulnerability in various APIs in Misskey","id":"CVE-2024-52579"},"products":["litestar"],"published":"2024-11-20","related":[{"cvss_score":7.4,"headline":"Litestar has a CORS origin allowlist bypass due to unescaped regex metacharacters in allowed origins","id":"CVE-2026-25478","kev_date_added":null,"published":"2026-02-09"},{"cvss_score":6.5,"headline":"Litestar has an AllowedHosts validation bypass due to unescaped regex metacharacters in configured host patterns","id":"CVE-2026-25479","kev_date_added":null,"published":"2026-02-09"},{"cvss_score":6.5,"headline":"FileStore key canonicalization collisions allow response cache mixup/poisoning (ASCII ord + Unicode NFKD)","id":"CVE-2026-25480","kev_date_added":null,"published":"2026-02-09"}],"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":"US public information, NVD API terms","name":"NVD"},{"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-25","vendors":["litestar-org"]},"summary":"An attacker can cause server memory exhaustion and denial of service by sending large multipart form-data requests to applications using the Litestar framework.","url":"https://insights.sbomify.com/CVE-2024-52581/"}