/

CVE-2026-73501

Severity:

CRITICAL RISK

(9.1)

Authentication Bypass (CWE-287) in kin-openapi Handler

CVE-2026-73501

Deferred

Vulnerability type

Category:

Authentication Bypass

CWE:

CWE-287

Impact:

Unauthorized Access

Severity:

CRITICAL RISK

(9.1)

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

kin-openapi can treat all OpenAPI security requirements as satisfied when an application uses ValidationHandler without configuring an authentication callback. Unauthenticated requests may therefore reach handlers protected by API keys, OAuth tokens, or other security schemes.

Affected context

The issue occurs in applications that use kin-openapi's ValidationHandler as request-enforcement middleware while leaving AuthenticationFunc unset. In this configuration, the handler substitutes a no-op authentication function instead of rejecting requests when authentication is unavailable, potentially exposing endpoints that declare OpenAPI security requirements.

Exploit preconditions

  • Attack surface: HTTP endpoints protected by OpenAPI security requirements
  • Required access: Network access to an affected endpoint; valid credentials may not be required
  • Trigger point: Request processing through ValidationHandler.Load()
  • Why exploitation is possible: A nil authentication callback is replaced with a function that returns success, causing security requirements to be treated as satisfied and preventing the intended fail-closed error path

Why this happens

The underlying bug is an insecure default in authentication middleware. When the authentication callback is nil, the implementation substitutes a no-op function that reports success rather than preserving an explicit missing-authentication error.

This behavior maps to CWE-287: Improper Authentication, because requests can be accepted without verifying the credentials required by the declared security scheme. The insecure pattern is allowing absent authentication logic to become an implicit allow decision.

Potential impact

  • Unauthenticated users may access protected API operations
  • Attackers could retrieve confidential application or user data
  • Unauthorized users may perform actions intended only for authenticated principals
  • Downstream authorization decisions may be reached without a verified identity
  • API abuse, data manipulation, or account-impacting operations could occur

General mitigation guidance

Mitigation generally focuses on fail-closed authentication behavior and explicit configuration.

Common defensive patterns include:

  • Rejecting requests when the required authentication callback is absent or unavailable
  • Avoiding no-op authentication implementations in production enforcement paths
  • Requiring explicit authentication configuration for every protected security scheme
  • Separating authentication from authorization and validating the authenticated identity before dispatch
  • Applying least-privilege permissions to identities and protected operations
  • Testing security requirements with unauthenticated, invalid-credential, and valid-credential requests

How teams detect issues like this

Organizations can look for:

  • Static analysis or code review findings where ValidationHandler is created without an authentication callback
  • Configuration patterns that permit nil, default, or no-op authentication handlers in production
  • Integration tests showing protected endpoints returning success without credentials
  • Runtime monitoring for requests to secured operations that lack expected authentication metadata
  • Policy checks requiring explicit authentication configuration for every declared OpenAPI security requirement

Automated code review tools may help identify default-allow authentication behavior and missing enforcement callbacks.

Sources

SourceLink
github.comgithub.com/getkin/kin-openapi/commit/f0407d53b0730280266f454b755010e7eeb985da
github.comgithub.com/getkin/kin-openapi/releases/tag/v0.144.0
github.comgithub.com/getkin/kin-openapi/security/advisories/GHSA-r277-6w6q-xmqw

Frequently asked

questions

Yes, when the affected application exposes protected HTTP endpoints and the attacker can send requests to them. Exploitability depends on the application's network exposure and middleware configuration.

Typically not. The flaw is triggered when the authentication callback is absent and the middleware treats that absence as successful authentication.

Use fail-closed behavior: reject requests when authentication is required but no valid authentication mechanism is configured or credentials cannot be verified.

Require explicit authentication handlers, prohibit no-op defaults in production, test every security scheme with unauthenticated requests, and monitor protected endpoints for missing identity evidence.

Find out what's already
exploitable in your codebase.