---
id: "CVE-2026-111642"
kind: "vulnerability"
aliases: ["CVE-2026-111642"]
title: "FastAPI-Admin: hard-coded JWT secret lets registered users become superuser"
severity: "high"
cvss: 8.8
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["fastapi-admin", "package", "python", "self-hosted"]
not_affected_if: ["custom-jwt-secret-set", "registration-disabled"]
published_at: "2026-10-16T18:17:44+00:00"
first_seen_at: "2026-10-23T21:57:13+00:00"
updated_at: "2026-10-23T22:33:26+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-111642", "first_seen_at": "2026-10-23T21:57:13+00:00"}]
---

# FastAPI-Admin: hard-coded JWT secret lets registered users become superuser

FastAPI-Admin through 3.0 signs its JWT tokens with a secret hard-coded in backend/app/config/setting.py. Anyone who registers through the open /api/v1/system/user/register endpoint can forge a token that names the superuser and gain superuser access.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

grep -n -i 'secret' backend/app/config/setting.py in the FastAPI-Admin install
If the JWT secret is a fixed literal in that file rather than read from an environment variable, the install is affected

## Fix

Until a fix is confirmed, change the JWT secret to a long random value, restrict or disable public registration, and rotate existing sessions

## Timeline

- 2026-10-23T21:57:13+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-111642

## From the sources

FastapiAdmin through 3.0 contains a hard-coded JWT signing secret in backend/app/config/setting.py that allows low-privileged users to forge tokens impersonating the superuser. Attackers can register via the unauthenticated /api/v1/system/user/register endpoint, log in, and forge an HS256 token keeping their session_id but naming the superuser in user_name to gain superuser privileges.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
