Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessRegister via unauthenticated endpoint
-
DeliveryLog in to obtain valid session_id
-
ExploitForge HS256 token with hard-coded secret
-
ExecutionImpersonate superuser via user_name
-
ImpactGain full administrative control
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A04:2025 - Cryptographic Failures
ASVS 5.0
V11 - Cryptography Key management, no hard-coded keys
|
| Exploitation Conditions | Exploitation requires that the FastapiAdmin instance expose the unauthenticated /api/v1/system/user/register endpoint (present by default through v3.0), allowing an attacker to create a low-privileged account and log in for a valid session_id. The attacker then forges an HS256 JWT signed with the hard-coded secret in backend/app/config/setting.py, retaining their session_id while setting user_name to the superuser. Limiting factors: the attacker needs network reachability to the API and the open-registration endpoint must be enabled; no user interaction, no prior credentials, and no administrative access are required, and no non-default configuration is needed on an affected 3.0-or-earlier build. |
| Impact | This is a genuine, high-priority privilege-escalation flaw rather than an inflated-CVSS paper risk. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N) describes a network-reachable, low-complexity attack requiring only low privileges - and that bar is effectively trivial because the companion weakness is an unauthenticated self-registration endpoint (/api/v1/system/user/register), so any remote attacker can mint the 'low-privileged' account needed. The hard-coded HS256 secret (CWE-321) then yields full superuser impersonation with high confidentiality, integrity, and availability impact (VC:H/VI:H/VA:H). No EPSS score, CISA KEV listing, or formal POC/exploit flag was supplied in the input, so automated-exploitation probability cannot be quantified from the data; however, the referenced HackMD writeup documents the complete forging technique step by step, materially lowering the barrier to weaponization. SSVC-style reading: exploitation is not confirmed active, technical impact is total, and the attack is plausibly automatable given fixed, publicly known secret material. Note one tension to verify: the input Tags label this 'Information Disclosure,' but the description and CWE-321 describe authentication bypass / privilege escalation, not disclosure - treat the tag as inaccurate. |
| Exploit ScenarioDerived | A remote attacker self-registers a normal account through the open /api/v1/system/user/register endpoint, logs in to obtain a valid session_id, then uses the publicly disclosed hard-coded secret to forge an HS256 JWT that keeps their session_id but sets user_name to the superuser, instantly gaining administrative control. A detailed public technical writeup (HackMD) describes this exact chain, though no packaged exploit tool or active exploitation was indicated in the input. The low attack complexity and network vector make this practical for any attacker who can reach the application's API. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 16, 2026
Privilege escalation in FastapiAdmin through version 3.0 allows any remote attacker who can reach the API to self-register a low-privileged account and then forge an HS256 JWT that impersonates the superuser, gaining full administrative control of the application. The flaw stems from a hard-coded JWT signing secret shipped in backend/app/config/setting.py (line 67), which lets an attacker sign arbitrary tokens while retaining their own valid session_id and simply setting user_name to the superuser; token validation in backend/app/core/dependencies.py (lines 72-112) trusts these forged claims. No user interaction, administrative access, or non-default configuration is required - only the ability to reach the registration endpoint and the API, which are present by default - and no public exploit code was identified at time of analysis, though a public technical writeup of the technique exists.
RemediationAI
No vendor-released patch was identified at time of analysis, so remediation must be applied by operators. The primary fix is to remove the hard-coded signing secret from backend/app/config/setting.py and replace it with a unique, randomly generated value of at least 256 bits supplied through an environment variable or secret manager at deploy time; because changing the secret invalidates all previously issued tokens, expect every user session to be terminated and require re-authentication (and note that any tokens already forged with the old secret become unusable). In addition, rotate the secret immediately on any instance that may have been exposed, since the shipped key should be treated as public. As a compensating control with the smallest operational footprint, disable or remove the unauthenticated /api/v1/system/user/register endpoint (or place it behind an administrative-only route or invite flow) so attackers cannot obtain an initial low-privileged session; the trade-off is that legitimate self-service signup stops working and users must be provisioned another way. To reduce exposure while patching, restrict network reachability to the API (bind to internal interfaces, require VPN or an authenticated reverse proxy, or block /api/v1/system/user/register at the WAF) - this lowers the attack surface but does not eliminate the flaw for anyone who can still reach the service. Because the forged-token technique preserves a valid session_id while altering the user_name claim, temporarily adding server-side validation that the session's stored user identity matches the token's user_name will detect or block exploitation attempts, at the cost of extra lookup logic and a possible performance penalty. Finally, audit application logs for tokens whose user_name changed relative to the originating session, treat any superuser activity from self-registered accounts as compromise, and review data integrity. Consult the VulnCheck advisory (https://www.vulncheck.com/advisories/fastapiadmin-through-3.0-hard-coded-jwt-secret-privilege-escalation), the upstream source references, and the researcher writeup (https://hackmd.io/@hieuPenguinnn/fastapiadmin-unauthenticated-autologin-and-hardcoded-jwt-secret) for the latest status.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
FastapiAdmin is a Python/FastAPI-based administrative backend that authenticates API requests with JSON Web Tokens. The vulnerability class is CWE-321, use of a hard-coded cryptographic key: the application embeds a static HMAC secret in its configuration module (backend/app/config/setting.py#L67) instead of generating a deployment-unique, secret-managed value. Because HS256 is a symmetric algorithm, anyone who knows that key can mint tokens that the server accepts as authentic. The authorization logic in backend/app/core/dependencies.py#L72-L112 resolves identity primarily from token claims, so an attacker can keep the session_id bound to the low-privileged account they legitimately created via the unauthenticated /api/v1/system/user/register endpoint, change the user_name claim to that of the superuser, re-sign the token with the known secret, and inherit superuser authorization. The affected package is captured by CPE cpe:2.3:a:fastapiadmin:fastapiadmin:*:*:*:*:*:*:*:*, i.e. the upstream FastapiAdmin distribution across its released versions up to and including 3.0; the CVSS 4.0 assessment (AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H) reflects a remotely reachable, low-complexity attack requiring only a low-privileged credential, with high confidentiality, integrity, and availability impact to the application itself and no demonstrated scope change.
Know when Fastapiadmin gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Network API attack with low complexity; PR:L reflects the required (but freely self-registerable) low-priv account, and forged superuser access yields full C/I/A compromise within the application scope.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
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.
Executive ViewAI
FastapiAdmin deployments through version 3.0 are exposed to a high-severity privilege-escalation flaw that can let a remote actor obtain full administrative control of the application. Because no vendor patch is available and the affected API is reachable by default, organizations running exposed FastapiAdmin instances should treat this as a priority risk to sensitive data, administrative functions, and service continuity. No public exploit identified at time of analysis; however, a public technical writeup of the technique exists.
No vendor-released patch identified at time of analysis. Interim mitigations: replace and rotate the hard-coded JWT signing secret, invalidate all existing tokens, disable self-registration if possible, restrict API and registration endpoints to trusted networks, monitor for forged superuser tokens, and deploy virtual patching or WAF/middleware controls until an official patch is available.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
More in Fastapiadmin
View allFastApiAdmin versions up to 2.2.0 expose sensitive information through the reset_api_docs function in the Custom Documen
Unauthenticated attackers can obtain a valid JWT session for any account - including superusers - in FastapiAdmin throug
FastApiAdmin up to 2.2.0 contains an unrestricted file upload vulnerability in the user avatar upload endpoint that allo
Unrestricted file upload in FastApiAdmin up to version 2.2.0 allows authenticated remote attackers to upload arbitrary f
FastApiAdmin versions up to 2.2.0 contain an unrestricted file upload vulnerability in the Scheduled Task API's upload c
FastApiAdmin versions up to 2.2.0 contain an information disclosure vulnerability in the file download endpoint that all
EUVD-2026-103064
GHSA-p7cm-h8w6-p4cm
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB