Choose Django when the app has users, permissions and an admin, FastAPI when it is a JSON API that waits on slow services, and keep Flask where it already runs. Patch before you compare: Django fixed six CVEs on 3 November 2026, and Starlette below 1.0.1, which FastAPI builds on, carries an authentication-bypass flaw that Security Arsenal reports CISA lists as exploited.⁠1⁠2⁠3 Then pin FastAPI to one minor version, because Scout Monitoring counted nine breaking releases between 18 and 23 October.⁠4

You need this if your team is starting a Python web service or weighing a move off one it already runs. You’re patched if you run Django 6.1.3, 6.0.10 or 5.2.19 (or later in your line) and Starlette 1.0.1 or later; Django releases older than 5.2 sit outside the supported list and got no fix.⁠1⁠2 Flask needs 3.1.3 or later.⁠5 Status as of 8 November 2026.

Surveys rank FastAPI first, and they measure use, not fit

Measured The JetBrains and Python Software Foundation survey, run in late 2024 and published in August 2025, found FastAPI used by 38% of respondents, Django by 35% and Flask by 34%. FastAPI was at 29% the year before.⁠6 That data is over a year old, and I found no newer edition. The Register’s reporter noted that FastAPI is an API framework and does not compare directly with the other two.⁠6

Stack Overflow’s 2025 survey, as relayed by Second Talent, also puts FastAPI first at 14.8%, ahead of Flask at 14.4% and Django at 12.6%.⁠7 Django and Flask swap places between the two surveys. Opinion Treat both as hiring-pool signals; neither tests fit for a given service.

None of this tells you what breaks in production.

Failures differ: blocked workers, blocked loops, breaking minors

Measured The only same-hardware Flask versus FastAPI comparison Second Talent cites is TechEmpower Round 20, from January 2021, which tested Flask 0.12.2 against FastAPI 0.54.1.⁠7 In it, Flask with an ORM reached 14,177 single-query requests a second and Flask with raw SQL reached 34,170. FastAPI with raw SQL reached 65,084.⁠7 The ORM moved Flask more than the framework gap did. I couldn’t open TechEmpower’s tables, so I give no ranking.

Flask runs one request per worker. Its documentation, as quoted by Second Talent, says each request still ties up one worker, even for async views.⁠7 Ten workers and ten slow model streams leave no spare worker, and the eleventh request waits. Django works either way: under WSGI, async views get a one-off event loop and no long-connection benefit, and transactions do not yet work in async mode.⁠8 FastAPI fails differently. One async route that calls a blocking driver stalls every request on that loop.⁠7

FastAPI’s documentation says any 0.x release could add breaking changes and recommends pinning.⁠9 Scout Monitoring counted three breaking releases, 0.146.0 to 0.148.0, in 21 hours on 18 and 19 October, and six more by 23 October. Release 0.162.0 reversed the 0.147.0 boolean-form change.⁠4 GitHub’s releases page shows 0.162.0, tagged 23 October, as the latest.⁠10

FrameworkLatest confirmedServer interfaceChange policy
Django6.1.3, 3 Nov 2026⁠1WSGI or ASGI⁠86.2 LTS due April 2027; annual releases from January 2028⁠11
FastAPI0.162.0, 23 Oct 2026⁠10ASGI⁠70.x; minor releases may break⁠9
Flask3.1.3, 19 Feb 2026⁠7WSGI⁠7Semantic versioning, 3.x since 2023⁠7

Each stack has a patch to apply before any migration

The Django team issued 6.1.3, 6.0.10 and 5.2.19 on 3 November 2026 for six CVEs, one moderate and five low.⁠1 Three touch GeoDjango, one touches UpdateCacheMiddleware and cache_page(), one touches view-only admin users on non-default user models, and one lets base64 multipart uploads buffer in memory.⁠1 Django’s post reports no exploitation, and I found none as of 8 November.

Reported GitHub’s advisory, published 4 June 2026 and rated 6.5, says Starlette through 1.0.0 built request.url from an unvalidated Host header. That let request.url.path differ from the path the router served, so code that makes access decisions from it could be bypassed. Starlette 1.0.1 fixes it.⁠2 Reported Security Arsenal says CISA added it to the Known Exploited Vulnerabilities catalog on 2 September 2026.⁠3 I couldn’t open CISA’s catalog, and the vendor sells security services, so treat that date as reported. Opinion A stale FastAPI pin can hold a stale Starlette, because FastAPI’s docs tell you to let FastAPI choose that version.⁠9

Reported Flask 3.1.2 and earlier could omit Vary: Cookie on some session reads (CVE-2026-27205). It matters only behind a caching proxy that stores cookie-bearing responses for pages with no private cache header. Flask 3.1.3 fixes it, and I found no exploitation reports.⁠5 Debian marks the issue minor and lists backported fixes, so a distro version string settles nothing.⁠5 Flask 3.1.3 dates from 19 February 2026, over six months ago, and I found no later release.⁠7

How you’d notice a stalled worker, a stalled loop or a drifting pin

Worker starvation shows as requests queuing while CPU sits idle, concentrated on endpoints that call slow upstreams. A blocked event loop looks different: every route on the process slows at once when one blocking call runs.

Unpinned FastAPI shows up as odd data. Scout Monitoring lists omitted boolean form fields arriving as False from 0.147.0 to 0.161.x, defaults reaching handlers unvalidated from 0.148.0, and an import-time TypeError where code passes extra keyword arguments to Query() after 0.155.0.⁠4

For the Starlette flaw, search access logs for Host values containing /, ? or #, the characters the advisory names as the trigger, if your proxy logs record the header.⁠2

Pick by the shape of the work

Opinion Pick Django when the product has accounts, permissions, an admin and rendered pages; its async layer is optional and its security fixes arrive on a published calendar. Pick FastAPI when the product is an API whose requests wait on other services, stream, or hold WebSockets, and the team will pin and test every bump. Keep Flask for a small WSGI service or an existing app. Flask’s own docs, as Second Talent reports them, send mostly-async code to Quart.⁠7

Django publishes its calendar: 6.1 is supported through December 2027, 6.2 LTS arrives in April 2027 with support to April 2030, and from January 2028 every release gets three years.⁠11 I found no 1.0 date for FastAPI.

Patch, pin, then pick

Do today

  1. Upgrade Django to 6.1.3, 6.0.10 or 5.2.19 and restart every worker.
  2. Check the resolved Starlette version in each FastAPI image and upgrade anything below 1.0.1.
  3. Search Starlette-based middleware and dependencies for request.url.path in allow or deny decisions, and switch those checks to the raw ASGI scope path.

Do this week

  1. Pin fastapi to one minor version, as its docs advise, and bump one minor at a time with the release notes open.
  2. Grep FastAPI form endpoints for omitted boolean fields, validators on defaulted Query, Header, Cookie or Form parameters, and Query() calls with extra keyword arguments.
  3. Move Flask to 3.1.3 or later, or confirm your distro package carries the backport, and mark session-backed pages private behind any caching proxy.
  4. Audit every async def route for synchronous database drivers.

Can wait

  1. Plan the Django move to 6.2 LTS, due April 2027.
  2. Revisit FastAPI’s pin policy when it reaches 1.0.