CVE-2021-32677
CVE-2021-32677 — Cross-Site Request Forgery (CSRF) in FastAPI
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…
Published Updated Sources: cvelistV5, GitHub_M
Triage
Is it exploited, how likely is exploitation, what does it touch, and how severe do the scoring sources call it.
Exploitation
Unreported
no source claims exploitation
EPSS
<1%
chance of exploitation in 30 days
CVSS base
8.2
HIGH
Affected scope
The catalog records vendors and products as separate lists, not pairs, so which product belongs to which vendor is not something this page can say.
Vendors (1)
Products (1)
Every base score collected
Sources score independently and disagree; each row says who scored it and under which version.
| Score | Version | Severity | Expl. | Impact | Source |
|---|---|---|---|---|---|
| 8.2 | CVSS 3.1 | HIGH | n/a | n/a | cvelistV5 |
Weakness & attack patterns
- CWE-352
Detection
Read off the CVSS vector and the weakness class. Starting points, not rules we have tested.
- Search application, proxy, and WAF logs for requests touching /json, /geo+json), /plain.
References
3 on the record
- github.com/tiangolo/fastapi/security/advisories/GHSA-8h2j-cgx8-6xv7
x_refsource_CONFIRM
- github.com/tiangolo/fastapi/commit/fa7e3c996edf2d5482fff8f9d890ac2390dede4d
x_refsource_MISC
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MATAWX25TYKNEKLDMKWNLYDB34UWTROA/
vendor-advisory, x_refsource_FEDORA
Related CVEs
Same product first, then the same weakness or threat actor.
- CVE-2020-10181 Sumavision EMR Cross-Site Request Forgery (CSRF) VulnerabilityCVSS 9.8 · CISA KEV
- CVE-2008-4128 Cisco IOS Cross-Site Request Forgery VulnerabilityCVSS 9.3 · CISA KEV
- CVE-2025-62593 Ray is vulnerable to RCE via Safari & Firefox Browsers through DNS Rebinding AttackCVSS 8.8 · CISA KEV
- CVE-2023-2533 PaperCut MF/NG 22.0.10 (Build 65996 2023-03-27) - Remote code execution via CSRFCVSS 8.8 · CISA KEV
- CVE-2016-6277 NETGEAR Multiple Routers Remote Code Execution VulnerabilityCVSS 8.8 · CISA KEV
- CVE-2014-100005 D-Link DIR-600 Router Cross-Site Request Forgery (CSRF) VulnerabilityCVSS 8.0 · CISA KEV
Elsewhere on this site
Not in any source we poll
Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.
- No confirmed IOCs, IP addresses, domains, file hashes, or malware artifacts supplied.
- No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
- No exploit packet captures, log samples, or incident case IDs supplied.