/

CVE-2026-111644

Severity:

HIGH RISK

(7.3)

Missing Authentication (CWE-306) in Misaka Danmu Server

CVE-2026-111644

Deferred

Vulnerability type

Category:

Missing Authentication

CWE:

CWE-306

Impact:

Unauthorized Information Disclosure and Data Manipulation

Severity:

HIGH RISK

(7.3)

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

Misaka Danmu Server through version 2.8.9 exposes several /api/ui routes without the authentication dependency used to verify the current user. An unauthenticated attacker may access operational information and perform destructive actions, including deleting episode records, clearing media-server mappings, and removing audit history.

Misaka Danmu Server through version 2.8.9 exposes several /api/ui routes without the authentication dependency used to verify the current user. An unauthenticated attacker may access operational information and perform destructive actions, including deleting episode records, clearing media-server mappings, and removing audit history.

Affected context

The issue occurs in Misaka Danmu Server deployments where audit, diagnostics, data-check, scan-index, or health routes under /api/ui are reachable without authentication. The affected handlers lack the expected get_current_user dependency, so exposure depends on network reachability and any additional access controls placed in front of the application.

The issue occurs in Misaka Danmu Server deployments where audit, diagnostics, data-check, scan-index, or health routes under /api/ui are reachable without authentication. The affected handlers lack the expected get_current_user dependency, so exposure depends on network reachability and any additional access controls placed in front of the application.

Exploit preconditions

  • Attack surface: HTTP API routes under /api/ui
  • Required access: No application authentication is required when the affected routes are reachable
  • Trigger point: A request to an exposed audit, diagnostics, data-check, scan-index, or health endpoint
  • Why exploitation is possible: The affected route handlers do not enforce the authentication dependency that validates the current user
  • Environmental factor: The server or its API must be reachable by the attacker through the local network, a proxy, or another exposed deployment interface
  • Attack surface: HTTP API routes under /api/ui
  • Required access: No application authentication is required when the affected routes are reachable
  • Trigger point: A request to an exposed audit, diagnostics, data-check, scan-index, or health endpoint
  • Why exploitation is possible: The affected route handlers do not enforce the authentication dependency that validates the current user
  • Environmental factor: The server or its API must be reachable by the attacker through the local network, a proxy, or another exposed deployment interface

Why this happens

The vulnerability results from inconsistent authentication enforcement across API routes. Sensitive handlers were registered without the authorization dependency used by protected endpoints, allowing requests to proceed as an anonymous user.

This behavior maps to CWE-306: Missing Authentication for Critical Function, because functions that expose sensitive data or modify server state do not verify the identity of the caller before processing requests.

The vulnerability results from inconsistent authentication enforcement across API routes. Sensitive handlers were registered without the authorization dependency used by protected endpoints, allowing requests to proceed as an anonymous user.

This behavior maps to CWE-306: Missing Authentication for Critical Function, because functions that expose sensitive data or modify server state do not verify the identity of the caller before processing requests.

Potential impact

  • An attacker may read audit logs containing login IP addresses
  • An attacker may access server logs and environment path information
  • An attacker may delete episode database rows
  • An attacker may clear media-server mappings
  • An attacker may wipe audit history and reduce forensic visibility
  • The exposed information could support further attacks against the deployment
  • An attacker may read audit logs containing login IP addresses
  • An attacker may access server logs and environment path information
  • An attacker may delete episode database rows
  • An attacker may clear media-server mappings
  • An attacker may wipe audit history and reduce forensic visibility
  • The exposed information could support further attacks against the deployment

General mitigation guidance

Mitigation generally focuses on enforcing authentication and authorization consistently at every sensitive route.

Common defensive patterns include:

  • Applying a centralized authentication dependency or middleware to all /api/ui routes by default
  • Requiring explicit authorization checks for destructive operations and administrative data
  • Using secure-by-default route registration so new endpoints cannot silently bypass authentication
  • Reducing trust in client-supplied identity or privilege indicators
  • Restricting API exposure through network segmentation, authenticated reverse proxies, and management-plane access policies
  • Running the service with least-privilege database and filesystem permissions to limit damage from unauthorized actions
  • Preserving audit records through append-only or separately protected logging where practical

Mitigation generally focuses on enforcing authentication and authorization consistently at every sensitive route.

Common defensive patterns include:

  • Applying a centralized authentication dependency or middleware to all /api/ui routes by default
  • Requiring explicit authorization checks for destructive operations and administrative data
  • Using secure-by-default route registration so new endpoints cannot silently bypass authentication
  • Reducing trust in client-supplied identity or privilege indicators
  • Restricting API exposure through network segmentation, authenticated reverse proxies, and management-plane access policies
  • Running the service with least-privilege database and filesystem permissions to limit damage from unauthorized actions
  • Preserving audit records through append-only or separately protected logging where practical

How teams detect issues like this

High-level detection can combine application review, runtime testing, and policy enforcement:

  • Use static analysis to identify sensitive route declarations that omit authentication or authorization dependencies
  • Review route middleware and dependency inheritance to confirm that protection is applied consistently
  • Flag handlers that expose logs, diagnostics, health details, database records, or destructive operations without an authenticated principal
  • Test management APIs from an unauthenticated session and verify that sensitive routes return an authentication failure
  • Monitor requests to administrative endpoints and alert on anonymous access or unexpected destructive operations
  • Enforce API security policies in code review and CI, with neutral automated review tools helping identify newly added unprotected routes

High-level detection can combine application review, runtime testing, and policy enforcement:

  • Use static analysis to identify sensitive route declarations that omit authentication or authorization dependencies
  • Review route middleware and dependency inheritance to confirm that protection is applied consistently
  • Flag handlers that expose logs, diagnostics, health details, database records, or destructive operations without an authenticated principal
  • Test management APIs from an unauthenticated session and verify that sensitive routes return an authentication failure
  • Monitor requests to administrative endpoints and alert on anonymous access or unexpected destructive operations
  • Enforce API security policies in code review and CI, with neutral automated review tools helping identify newly added unprotected routes

Sources

SourceLink
github.comgithub.com/l429609201/misaka_danmu_server/blob/v2.8.9/src/api/ui/audit.py#L31-L66
github.comgithub.com/l429609201/misaka_danmu_server/blob/v2.8.9/src/api/ui/data_check.py#L116-L140
github.comgithub.com/l429609201/misaka_danmu_server/blob/v2.8.9/src/api/ui/diagnostics.py#L156-L210
hackmd.iohackmd.io/@hieuPenguinnn/misaka-danmu-server-ui-api-missing-authentication
vulncheck.comvulncheck.com/advisories/misaka-danmu-server-through-2.8.9-missing-authentication-on-api-ui-routes

Frequently asked

questions

It can be remotely exploitable when the Misaka Danmu Server API is reachable by an attacker and the affected routes are not protected by an external access-control layer.

No application account is required for the affected routes because they do not enforce the expected current-user authentication dependency. Network access to the exposed API may still be necessary.

Require authentication and appropriate authorization for every sensitive /api/ui route, especially endpoints that disclose operational data or modify persistent state. Applying protection centrally by default helps prevent route-specific omissions.

Maintain an inventory of administrative endpoints, test unauthenticated access in CI, review dependency inheritance during code changes, restrict management interfaces at the network boundary, and monitor for anonymous requests to sensitive routes.

It can be remotely exploitable when the Misaka Danmu Server API is reachable by an attacker and the affected routes are not protected by an external access-control layer.

No application account is required for the affected routes because they do not enforce the expected current-user authentication dependency. Network access to the exposed API may still be necessary.

Require authentication and appropriate authorization for every sensitive /api/ui route, especially endpoints that disclose operational data or modify persistent state. Applying protection centrally by default helps prevent route-specific omissions.

Maintain an inventory of administrative endpoints, test unauthenticated access in CI, review dependency inheritance during code changes, restrict management interfaces at the network boundary, and monitor for anonymous requests to sensitive routes.

Find out what's already
exploitable in your codebase.