FastAPI
Contains no cryptography; exposure comes from the TLS terminator, outbound clients, the JWT algorithm and library you pick, IdP tokens, passkeys and Web Push.
- PyPI
fastapi- Version cited
- 0.165.1(3 Dec 2026, Swagger UI file-picker fix) per the ASTRA report; the Claude and AGY reports cite 0.165.0 (18 Nov 2026)
- Downloads
- 567M/mo
- Group
- Web frameworks
Key exchange and encryption
Not affected
No TLS or key exchange
Signatures and identity
Not affected
No signing code in the wheel
What to do
No upgrade needed for the advisory. Audit what surrounds the app: TLS termination and outbound clients, the JWT algorithm and library, IdP algorithm allowlists, passkeys and Web Push.
Since 1 Dec 2026 0.165.1 (3 Dec 2026) fixes a Swagger UI file picker; no advisory-related change or maintainer statement found as of 3 Dec 2026.
Details
FastAPI has no cryptographic code. The extracted 0.165.0 wheel imports none of hashlib, hmac, ssl, cryptography, secrets, itsdangerous, jwt or jose (PyPI fastapi 0.165.0). fastapi/security/ only extracts headers, cookies and forms and generates OpenAPI schemas, and OAuth2PasswordBearer extracts the bearer credential without verifying its signature or deciding permissions.
Dependencies#
- Bare FastAPI depends directly on Starlette, AnyIO, Pydantic and support packages, not on a TLS engine, PyJWT or
cryptography.fastapi[standard]adds the CLI anduvicorn[standard], among other packages (FastAPI 0.165.1 metadata). - PyPI
requires_distfor 0.165.0 shows no crypto dependency. - 566,869,823 downloads in 30 days (PyPI fastapi).
Where a FastAPI service is exposed#
FastAPI leaves token signing to your app. HS256 tokens signed with your own secret and Argon2 password hashes, the choices in its official tutorial (PyJWT with HS256, pwdlib[argon2]), are not implicated (find your auth pattern). Exposure comes from inbound TLS (proxy, load balancer, or Uvicorn, Hypercorn or Granian with P-256 leaf certificates), outbound TLS, switching ALGORITHM to ES256 or EdDSA, validating third-party IdP tokens, passkeys, Web Push and app-level ECDH or X25519 encryption. The AGY report’s action for the core plus its stack: audit TLS termination, JWT libraries, IdP ES256 allowlists and outbound clients. See each TLS hop and the playbook.
Releases and statements since 1 Dec 2026#
Sources disagree. The Claude and AGY reports cite 0.165.0 (18 Nov 2026) and the Claude report says there was no release after the advisory. The ASTRA report found 0.165.1, released 3 Dec 2026, whose release notes list a Swagger UI file-picker fix, not a cryptographic migration.
- No statement from tiangolo (Sebastián Ramírez) or Kludex (Marcelo Trylesinski) has been found since 1 Dec 2026.
- The only government-crypto-adjacent precedent is a 2022 Starlette bump for FIPS compatibility (FastAPI PR #4483).
- The tutorial’s library history: PR #1610 moved it to python-jose, PR #11589 back to PyJWT, PR #13917 replaced passlib with pwdlib + Argon2 (FastAPI release notes).
Publishing: no attestations since 0.128.0#
FastAPI stopped producing PEP 740 attestations after 0.128.0. 0.129.0 returns 404 (0.129.0 integrity 404), and 0.164.0 and 0.165.0 have none; of 742 FastAPI files on PyPI, 106 have provenance. Its workflow now runs uv build and uv publish with id-token: write, which is Trusted Publishing without the pypa publish action (fastapi publish.yml). FastAPI’s integrity therefore rests on PyPI TLS, Trusted Publishing and hashes (supply chain).
Full discussion: FastAPI and auth
Sources cited on this page 9
- PyPI fastapi 0.165.0 pypi.org
- OAuth2PasswordBearer github.com
- FastAPI 0.165.1 metadata pypi.org
- PyPI fastapi pypi.org
- release notes github.com
- FastAPI PR #4483 github.com
- FastAPI release notes fastapi.tiangolo.com
- 0.129.0 integrity 404 pypi.org
- fastapi publish.yml github.com