Security readout for executives and security teams
Plain-English summary
FastAPI before 0.65.2 could accept JSON data even when a browser sent it as text/plain. For applications using cookies for authentication, this could let a malicious site trigger authenticated actions in a user’s browser without the normal CORS preflight protection.
Executive priority
Treat as high priority for browser-facing FastAPI services using cookie sessions. The fix is straightforward, and affected systems could allow unauthorized actions under a legitimate user’s session. Prioritize public portals and admin workflows first.
Technical view
The flaw is CWE-352 CSRF. Vulnerable FastAPI versions parsed request bodies as JSON without requiring application/json or a compatible media type. Browser text/plain requests are simple requests and can include cookies, so affected JSON path operations using cookie authentication could process forged state-changing requests.
Likely exposure
Exposure is most likely in FastAPI applications below 0.65.2 that authenticate browser users with cookies and expose JSON endpoints that change data or perform sensitive actions. APIs using non-cookie authentication or not reachable by browsers may have lower practical exposure, but the sources do not fully enumerate safe configurations.
Exploitation context
The provided sources do not show CISA KEV listing or active exploitation evidence. Exploitation depends on an authenticated browser context and vulnerable application behavior: cookie-based auth, JSON payload handling, and acceptance of non-JSON content types. Internet-facing administrative or customer portals are higher concern.
Researcher notes
The key issue is parser behavior, not a generic CORS misconfiguration. The fix narrows JSON parsing to application/json and compatible media types. Validation should focus on content-type handling and cookie-authenticated JSON operations, without assuming every FastAPI deployment is exploitable.
Mitigation direction
- Upgrade FastAPI to 0.65.2 or later; latest stable is preferred.
- If upgrade is delayed, enforce JSON-compatible Content-Type on JSON endpoints.
- Reject unexpected text/plain bodies before request data is parsed as JSON.
- Review cookie-authenticated state-changing endpoints for CSRF protections.
- Check distribution package advisories if FastAPI came from an OS repository.
Validation and detection
- Inventory deployed FastAPI versions and flag anything below 0.65.2.
- Identify JSON endpoints that rely on browser cookies for authentication.
- Confirm JSON endpoints reject non-JSON-compatible Content-Type values.
- Add regression tests for Content-Type enforcement on sensitive routes.
- Verify dependency lockfiles, containers, and runtime environments use the fixed FastAPI version.
Public sources used
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
CWE-352: User-session and phishing behavior lookup
Client-side and session-facing weaknesses should be reviewed alongside initial-access and user-execution behaviors. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
Open ATT&CK lookupCVE-2021-32677 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
Open ATT&CK lookup- Severity
- High
- CVSS
- 8.2 (3.1)
- Known Exploited
- No
- Published
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N
CNA and ADP enrichment extracted from CVE v5
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
CVSS vector scores
1 official scoreWe collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N3.94.2Primary CVE scoreVulnerability scoring details
Base CVSS 3.1 score
8.2HighVector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N
Source materials
- CVE List V5 sourceCVE List V5
- https://github.com/tiangolo/fastapi/security/advisories/GHSA-8h2j-cgx8-6xv7CVE reference · x_refsource_CONFIRM
- https://github.com/tiangolo/fastapi/commit/fa7e3c996edf2d5482fff8f9d890ac2390dede4dCVE reference · x_refsource_MISC
- FEDORA-2021-917e89c036CVE reference · vendor-advisory, x_refsource_FEDORA
Products and packages named in the record
CWE details
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
Cross-Site Request Forgery (CSRF)
Cross-Site Request Forgery (CSRF) represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.
