Severity:

HIGH RISK

(7.3)

Missing Authentication in MiroFish REST API Endpoint

CVE-2026-7042

Deferred

Vulnerability type

Category:

Missing Authentication

CWE:

CWE-287, CWE-306

Impact:

Unauthorized Access to Protected Functionality

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

A missing authentication flaw in the MiroFish REST API endpoint allows remote users to access application functionality without proper identity verification.

When the affected create_app function in backend/app/__init__.py is used with this misconfiguration, critical routes may be exposed to unauthenticated attackers over the network.

Affected context

The vulnerability arises in deployments of MiroFish (up to version 0.1.2) where the REST API is exposed over a network and the create_app function is responsible for wiring routes and middleware.

In this context, certain endpoints that should require authentication may be left accessible to any caller because the authentication layer is not correctly enforced or is missing entirely.

The risk is higher in environments where the API is reachable from untrusted networks or the public internet, and where sensitive operations are exposed via this REST interface.

Exploit preconditions

  • Attack surface: Public or internal REST API endpoints provided by the MiroFish backend.
  • Required access: Network access to the affected API; no prior authentication or valid credentials are required.
  • Trigger point: Sending crafted HTTP requests directly to endpoints that should be protected but lack authentication checks.
  • Why exploitation is possible: The create_app function does not correctly apply authentication/authorization middleware or checks to all relevant routes, leading to endpoints being exposed without identity verification.

Why this happens

This issue is a classic example of CWE-287: Improper Authentication, and is closely related to CWE-306: Missing Authentication for Critical Function.

At the framework level, the application initialization logic in create_app fails to guarantee that authentication is consistently enforced for sensitive REST API routes.

This can manifest as routes being registered without authentication decorators, middleware not being applied globally, or configuration defaults that treat all users as anonymous.

The abstract pattern is that security controls are optional or opt-in at the route level instead of being enforced by default, which leads to unintended exposure when developers omit or misconfigure authentication for critical operations.

Potential impact

  • An attacker may invoke sensitive REST API operations without logging in.
  • Unauthenticated users could read, modify, or delete application data, depending on exposed endpoints.
  • Critical administrative or configuration functions can be triggered by anyone with network access.
  • The application's integrity and confidentiality may be compromised, potentially leading to broader system compromise through chained attacks.

General mitigation guidance

Effective mitigation focuses on enforcing authentication and authorization as default behaviors for REST APIs:

  • Introduce a mandatory authentication layer (e.g., middleware) applied globally to all routes, with explicit allow-lists for truly public endpoints.
  • Use a central access-control policy that maps routes to required authentication and roles, avoiding scattered ad-hoc checks in individual handlers.
  • Design the create_app function so that security configuration (authentication, authorization, CORS, rate limiting) is wired before any route registration.
  • Treat configuration flags that disable authentication as development-only, and ensure they are not enabled in production environments.
  • Apply the principle of least privilege by ensuring that authenticated identities receive only the minimal access necessary to perform their tasks.

How teams detect issues like this

Detection typically involves both code and behavior analysis:

  • Static review: Examine create_app and routing modules to confirm that authentication middleware or decorators are applied to all non-public endpoints.
  • Static analysis rules: Use patterns that flag route registration functions lacking authentication/authorization annotations or middleware.
  • Configuration audits: Check environment and framework configuration for flags that disable or bypass authentication checks.
  • Dynamic testing: Perform authenticated vs. unauthenticated API calls during security testing to confirm that sensitive endpoints return authorization errors when called anonymously.
  • Automated code review tools and API security scanners can be configured to identify routes that respond successfully to unauthenticated requests where protection is expected.

Sources

SourceLink
github.comgithub.com/666ghj/MiroFish/
github.comgithub.com/666ghj/MiroFish/issues/487
vuldb.comvuldb.com/submit/798583
vuldb.comvuldb.com/vuln/359621
vuldb.comvuldb.com/vuln/359621/cti

Frequently asked

questions

Yes. Because the issue affects a REST API endpoint and does not enforce proper authentication, any user with network access to the API can attempt to exploit it remotely.

No. The core problem is that certain endpoints do not verify identity at all, so an attacker can be completely unauthenticated and still access protected functionality.

Implement a global authentication and authorization layer in the application initialization logic (e.g., within create_app) so that all routes are protected by default, and only explicitly marked endpoints are allowed to be public.

Adopt a security-by-default design: require authentication for all state-changing or data-revealing operations, enforce access control via centralized policies, and include automated tests and static analysis rules that fail builds when new routes are added without authentication.

Find out what's already
exploitable in your codebase.