/

CVE-2026-111641

Severity:

CRITICAL RISK

(9.8)

Missing Authentication (CWE-306) in FastapiAdmin App

CVE-2026-111641

Deferred

Vulnerability type

Category:

Missing Authentication

CWE:

CWE-306

Impact:

Unauthorized account access and administrative takeover

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

FastapiAdmin contains unprotected auto-login endpoints that allow unauthenticated users to obtain sessions for arbitrary accounts.

An attacker may use these endpoints to acquire a superuser JWT and gain full administrative control when the affected authentication routes are publicly reachable.

FastapiAdmin contains unprotected auto-login endpoints that allow unauthenticated users to obtain sessions for arbitrary accounts.

An attacker may use these endpoints to acquire a superuser JWT and gain full administrative control when the affected authentication routes are publicly reachable.

Affected context

The vulnerability occurs in FastapiAdmin deployments where auto-login functionality is exposed without effective authentication or authorization checks. The affected flow includes an endpoint that lists users, an endpoint that issues auto-login credentials, and a token exchange that produces a JWT session, allowing the trust boundary around administrative authentication to be bypassed.

The vulnerability occurs in FastapiAdmin deployments where auto-login functionality is exposed without effective authentication or authorization checks. The affected flow includes an endpoint that lists users, an endpoint that issues auto-login credentials, and a token exchange that produces a JWT session, allowing the trust boundary around administrative authentication to be bypassed.

Exploit preconditions

  • Attack surface: Network-accessible FastapiAdmin auto-login API endpoints
  • Required access: No prior authentication is required when the endpoints are exposed
  • Trigger point: Requests to the user-listing and auto-login token exchange flow
  • Why exploitation is possible: The application permits unauthenticated users to select an account and obtain a session without verifying authorization for the requested identity
  • Attack surface: Network-accessible FastapiAdmin auto-login API endpoints
  • Required access: No prior authentication is required when the endpoints are exposed
  • Trigger point: Requests to the user-listing and auto-login token exchange flow
  • Why exploitation is possible: The application permits unauthenticated users to select an account and obtain a session without verifying authorization for the requested identity

Why this happens

The root cause is a missing authentication and authorization control on security-sensitive auto-login functionality.

The application treats unauthenticated requests as trusted when identifying users and issuing session credentials. This behavior maps to CWE-306: Missing Authentication for Critical Function, because a critical account-session operation can be invoked without first establishing the caller's identity and permissions.

The root cause is a missing authentication and authorization control on security-sensitive auto-login functionality.

The application treats unauthenticated requests as trusted when identifying users and issuing session credentials. This behavior maps to CWE-306: Missing Authentication for Critical Function, because a critical account-session operation can be invoked without first establishing the caller's identity and permissions.

Potential impact

  • An attacker may obtain sessions for arbitrary users
  • An attacker could gain full administrative control through a superuser session
  • Unauthorized users may access, alter, or delete managed application data
  • The application could be used to create persistence or change security-related settings
  • Connected services or administrative workflows may be disrupted
  • An attacker may obtain sessions for arbitrary users
  • An attacker could gain full administrative control through a superuser session
  • Unauthorized users may access, alter, or delete managed application data
  • The application could be used to create persistence or change security-related settings
  • Connected services or administrative workflows may be disrupted

General mitigation guidance

Mitigation generally focuses on protecting every authentication and session-issuance path with explicit identity and authorization checks.

Common defensive patterns include:

  • Disabling or removing auto-login endpoints when they are not required
  • Requiring strong authentication before user selection or token issuance
  • Enforcing server-side authorization for the requested account and session role
  • Preventing user enumeration through unauthenticated API responses
  • Applying least privilege to administrative accounts and service tokens
  • Restricting administrative interfaces behind network access controls and additional authentication layers
  • Using short-lived, audience-bound session tokens with secure revocation and audit controls

Mitigation generally focuses on protecting every authentication and session-issuance path with explicit identity and authorization checks.

Common defensive patterns include:

  • Disabling or removing auto-login endpoints when they are not required
  • Requiring strong authentication before user selection or token issuance
  • Enforcing server-side authorization for the requested account and session role
  • Preventing user enumeration through unauthenticated API responses
  • Applying least privilege to administrative accounts and service tokens
  • Restricting administrative interfaces behind network access controls and additional authentication layers
  • Using short-lived, audience-bound session tokens with secure revocation and audit controls

How teams detect issues like this

Organizations can detect this class of issue through:

  • Static analysis and code review for authentication routes that lack middleware or authorization checks
  • Review of endpoints that accept user identifiers before establishing caller identity
  • API inventory checks for unauthenticated routes capable of issuing JWTs or equivalent sessions
  • Dynamic tests that verify protected endpoints reject anonymous requests and cross-account access attempts
  • Monitoring for unusual auto-login activity, rapid token issuance, user enumeration, and new administrative sessions
  • Policy enforcement requiring security review for endpoints that create or elevate sessions

Automated application-security and API-security review tools may help identify missing access-control enforcement, but coverage should be validated against the application's authorization model.

Organizations can detect this class of issue through:

  • Static analysis and code review for authentication routes that lack middleware or authorization checks
  • Review of endpoints that accept user identifiers before establishing caller identity
  • API inventory checks for unauthenticated routes capable of issuing JWTs or equivalent sessions
  • Dynamic tests that verify protected endpoints reject anonymous requests and cross-account access attempts
  • Monitoring for unusual auto-login activity, rapid token issuance, user enumeration, and new administrative sessions
  • Policy enforcement requiring security review for endpoints that create or elevate sessions

Automated application-security and API-security review tools may help identify missing access-control enforcement, but coverage should be validated against the application's authorization model.

Sources

SourceLink
github.comgithub.com/fastapiadmin/FastapiAdmin/blob/v3.0/backend/app/api/v1/module_system/auth/controller.py#L173-L251
hackmd.iohackmd.io/@hieuPenguinnn/fastapiadmin-unauthenticated-autologin-and-hardcoded-jwt-secret
vulncheck.comvulncheck.com/advisories/fastapiadmin-through-3.0-authentication-bypass-via-auto-login-endpoints

Frequently asked

questions

It may be remotely exploitable when the affected FastapiAdmin API endpoints are reachable by an attacker and do not require authentication.

No valid account is required according to the described behavior. Network reachability to the exposed auto-login endpoints is the primary prerequisite.

Require authenticated, authorized requests before listing users, selecting an account, issuing auto-login credentials, or exchanging tokens for sessions. Remove unnecessary auto-login functionality where possible.

Maintain an explicit authorization policy for every session-creation endpoint, test anonymous and cross-account access paths, minimize user-enumeration responses, and monitor administrative token issuance.

It may be remotely exploitable when the affected FastapiAdmin API endpoints are reachable by an attacker and do not require authentication.

No valid account is required according to the described behavior. Network reachability to the exposed auto-login endpoints is the primary prerequisite.

Require authenticated, authorized requests before listing users, selecting an account, issuing auto-login credentials, or exchanging tokens for sessions. Remove unnecessary auto-login functionality where possible.

Maintain an explicit authorization policy for every session-creation endpoint, test anonymous and cross-account access paths, minimize user-enumeration responses, and monitor administrative token issuance.

Find out what's already
exploitable in your codebase.