Version 0.115.0
fastapi
FastAPI framework, high performance, easy to learn, fast to code, ready for production
Install Instructions
pip install fastapi
Current Version Release Date September 17, 2024
Language Python
Package URL (purl) pkg:pip/fastapi@0.115.0
Find fastapi
vulnerabilities in your supply chain.
fastapi Vulnerabilities
Sort by
CVVS Score
CVSS Score | CVE | CWE(s) | EPSS Score | EPSS % | Impacted Versions |
---|---|---|---|---|---|
High 7.5 | CVE-2024-24762 | CWE-400, CWE-1333 | 0.00124 | 0.4766 |
|
High 8.1 | CVE-2021-32677 | CWE-352 | 0.00088 | 0.38089 |
|
fastapi Vulnerability Remediation Guidance
CVE | Description | Full list of Impacted Versions | Fix |
---|---|---|---|
CVE-2024-24762 | FastAPI is a web framework for building APIs with Python 3.8+ based on standard Python type hints. When using form data, `python-multipart` uses a Regular Expression to parse the HTTP `Content-Type` header, including options. An attacker could send a custom-made `Content-Type` option that is very difficult for the RegEx to process, consuming CPU resources and stalling indefinitely (minutes or more) while holding the main event loop. This means that process can't handle any more requests. It's a ReDoS(Regular expression Denial of Service), it only applies to those reading form data, using `python-multipart`. This vulnerability has been patched in version 0.109.1. | 0.77.1, 0.96.1, 0.101.1, 0.97.0, 0.95.2, 0.91.0, 0.90.1, 0.89.1 (Show all) | Minor → 0.109.1 |
CVE-2021-32677 | FastAPI is a web framework for building APIs with Python 3.6+ based on standard Python type hints. FastAPI versions lower than 0.65.2 that used cookies for authentication in path operations that received JSON payloads sent by browsers were vulnerable to a Cross-Site Request Forgery (CSRF) attack. In versions lower than 0.65.2, FastAPI would try to read the request payload as JSON even if the content-type header sent was not set to application/json or a compatible JSON media type (e.g. application/geo+json). A request with a content type of text/plain containing JSON data would be accepted and the JSON data would be extracted. Requests with content type text/plain are exempt from CORS preflights, for being considered Simple requests. The browser will execute them right away including cookies, and the text content could be a JSON string that would be parsed and accepted by the FastAPI application. This is fixed in FastAPI 0.65.2. The request data is now parsed as JSON only if the content-type header is application/json or another JSON compatible media type like application/geo+json. It's best to upgrade to the latest FastAPI, but if updating is not possible then a middleware or a dependency that checks the content-type header and aborts the request if it is not application/json or another JSON compatible content type can act as a mitigating workaround. | 0.6.0, 0.61.1, 0.56.0, 0.53.1, 0.50.0, 0.27.2, 0.27.1, 0.19.0 (Show all) | Minor → 0.109.1 |
Instantly see if these fastapi
vulnerabilities affect your code.
Dependencies
Packages using versions of lodash affected by its vulnerabilities
Dependent Packages |
---|
starlette<0.39.0,>=0.37.2 |
pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0,>=1.7.4 |
typing-extensions>=4.8.0 |
fastapi-cli[standard]>=0.0.5; extra == "standard" |
httpx>=0.23.0; extra == "standard" |
jinja2>=2.11.2; extra == "standard" |
python-multipart>=0.0.7; extra == "standard" |
email-validator>=2.0.0; extra == "standard" |
uvicorn[standard]>=0.12.0; extra == "standard" |
fastapi-cli[standard]>=0.0.5; extra == "all" |
httpx>=0.23.0; extra == "all" |
jinja2>=2.11.2; extra == "all" |
python-multipart>=0.0.7; extra == "all" |
itsdangerous>=1.1.0; extra == "all" |
pyyaml>=5.3.1; extra == "all" |
ujson!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0,>=4.0.1; extra == "all" |
orjson>=3.2.1; extra == "all" |
email-validator>=2.0.0; extra == "all" |
uvicorn[standard]>=0.12.0; extra == "all" |
pydantic-settings>=2.0.0; extra == "all" |
pydantic-extra-types>=2.0.0; extra == "all" |