VulnarioBlogFastAPI vulnerabilities

FastAPI Vulnerabilities: The 2 Most Critical FastAPI Security Bugs (CVEs)

FastAPI vulnerabilities are security flaws in FastAPI that attackers can abuse to steal data, take over a server or interrupt a service. FastAPI is a modern Python web framework for building APIs. The National Vulnerability Database (NVD) lists 2 CVEs for FastAPI, 0 of them rated critical, and 1 was published in the last 12 months. None of them is currently listed in CISA's Known Exploited Vulnerabilities (KEV) catalog for the product entries we checked.

This guide lists the 2 most critical FastAPI security bugs, with the CVE number, CVSS score, affected versions and what to do about each one. It also covers FastAPI security basics and a free way to be told about the next FastAPI CVE as soon as it is published.

Key takeaways

  • No FastAPI CVE is currently in CISA's KEV catalog for the entries we checked, but critical flaws still get exploited quickly once details are public.
  • 0 FastAPI CVEs are rated critical (CVSS v3), and 1 new one was published in the last 12 months.
  • The newest CVE in this guide is CVE-2025-68481, published Dec 19, 2025.
  • You can monitor FastAPI for free. Vulnario emails you when a new CVE matches your version and the rest of your stack.

How we ranked these FastAPI CVEs

We ranked CVEs first by whether CISA lists them as exploited, then by CVSS score (v3 scores before the older v2 scale, which is marked when used), then by publication date (newest first). When a technology has several product entries in NVD, we combined them and removed duplicates. This favors the bugs that matter most in practice, so the guide is a list of the most critical flaws we found, not a complete history.

Every CVE number, score, date and affected version below comes from the NVD record and the CISA KEV catalog, checked on Nov 3, 2026. Scores can change when NVD reanalyzes a record, so open the linked record if you need the current value.

The 2 most critical FastAPI CVEs at a glance

Most critical FastAPI vulnerabilities (data from NVD and CISA KEV)
#CVECVSSPublishedTypeCISA KEV
1CVE-2025-684818.8 High2025-12-19Cross-site request forgery (CSRF)No
2CVE-2021-326778.1 High2021-06-09Cross-site request forgery (CSRF)No

Each FastAPI CVE explained

1. CVE-2025-68481: Cross-site request forgery (CSRF)

  • CVSS 8.8 High
  • Published 2025-12-19
  • CWE-285
What NVD says
FastAPI Users allows users to quickly add a registration and authentication system to their FastAPI project. Prior to version 15.0.2, the OAuth login state tokens are completely stateless and carry no per-request entropy or any data that could link them to the session that initiated the OAuth flow.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
before 15.0.2
What to do
Upgrade to 15.0.2 or a later release, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2025-68481 (opens in a new tab)

2. CVE-2021-32677: Cross-site request forgery (CSRF)

  • CVSS 8.1 High
  • Published 2021-06-09
  • CWE-352
What NVD says
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.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and user interaction. It has high impact on confidentiality and integrity.
Affected versions
before 0.65.2
What to do
Upgrade to 0.65.2 or a later release, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2021-32677 (opens in a new tab)

FastAPI security checklist

  1. Update the core, themes, plugins and extensions as soon as security releases appear.
  2. Remove plugins, themes and modules you do not use.
  3. Give users the minimum role they need and enable two-factor authentication for administrators.
  4. Keep debug and development modes off in production.
  5. Back up files and database before every update.
  6. Put a web application firewall and rate limiting in front of login pages.

Your stack is bigger than FastAPI. A flaw anywhere in the chain can be the way in, so also review our guides to Python vulnerabilities, Flask vulnerabilities and Django vulnerabilities.

How to get alerted about new FastAPI vulnerabilities

NVD received 1 new FastAPI CVE in the last twelve months, and critical ones can be exploited within days. Reading advisories by hand is easy to forget, so most teams automate it. You have three practical options:

  • Follow the vendor's announcements and your distribution's security list. They are accurate but cover only one product and you read them manually.
  • Query the NVD feed yourself. It is complete and needs scripting, filtering and a mail or chat integration to maintain.
  • Use a stack-based alert service. You pick your technologies once and receive an email when a matching CVE appears.

Vulnario is the third option, and it is free to start. It scans the National Vulnerability Database, the CISA KEV catalog and GitHub Security Advisories every hour. You choose FastAPI and the rest of your stack, confirm your email with a code, and the alerts begin. Each email includes the CVE number, the CVSS score, a marker when CISA lists the flaw as actively exploited, the attack vector, a patch or advisory link and a suggested time frame to fix it.

  • Free: all technologies, alerts grouped at most every 12 hours.
  • Pro ($29/month): alerts are sent on the next hourly scan, so you hear about a new CVE up to 12 hours earlier.

Few stacks run FastAPI alone. These guides cover the technologies it is most often deployed with.

Frequently asked questions about FastAPI vulnerabilities

What are the most critical FastAPI vulnerabilities?

Based on NVD scores and CISA's exploited-vulnerability catalog, the most critical FastAPI CVEs include CVE-2025-68481 (CVSS 8.8), CVE-2021-32677 (CVSS 8.1). The guide above ranks the 2 most critical with affected versions and fixes.

Have FastAPI vulnerabilities been exploited in real attacks?

For the FastAPI product entries we checked, none of the CVEs is currently listed in CISA's Known Exploited Vulnerabilities (KEV) catalog. A CVE can still be exploited before it is added, so keep FastAPI patched.

How many vulnerabilities does FastAPI have?

As of Nov 3, 2026 the National Vulnerability Database lists 2 CVEs for FastAPI, with 0 rated critical by CVSS v3. 1 was published in the previous twelve months.

How can I get alerted when a new FastAPI CVE is published?

Add FastAPI to a service that watches the National Vulnerability Database, CISA KEV and GitHub Security Advisories. Vulnario does this for free: choose FastAPI and the rest of your stack, verify your email, and you receive an alert when a new CVE matches. Free alerts are grouped at most every 12 hours, and Pro sends them on the next hourly scan.

Is FastAPI secure?

FastAPI is as secure as its patch level. NVD published 1 new FastAPI CVE in the last twelve months, so running a current, supported release and applying security updates promptly is the most effective protection.

What is CVE-2025-68481?

CVE-2025-68481 is a high FastAPI vulnerability with a CVSS score of 8.8, published Dec 19, 2025. FastAPI Users allows users to quickly add a registration and authentication system to their FastAPI project. Prior to version 15.0.2, the OAuth login state tokens are completely stateless and carry no per-request entropy or any data that could link them to the session that initiated the OAuth flow.

Sources

This article is informational and not a substitute for your own risk assessment. CVSS scores and affected versions may change when NVD updates a record.