GO-2026-6095: kin-openapi: ValidationHandler.Load() Fail-Open Authentication Bypass via NoopAuthenticationFunc Default
kin-openapi is a Go project for handling OpenAPI files. Prior to 0.144.0, ValidationHandler.Load() in openapi3filter/validationhandler.go silently replaces a nil AuthenticationFunc with NoopAuthenticationFunc, which returns nil without checking credentials. This substitution causes every OpenAPI security requirement to be satisfied for unauthenticated requests when an application relies on ValidationHandler as its enforcement middleware. The no-op callback prevents the fail-closed ErrAuthenticationServiceMissing path from being reached and forwards the request to protected handlers that may require an API key, OAuth token, or another security scheme. This issue is fixed in version 0.144.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
kin-openapito a version that resolves this vulnerability.Fixed in 0.144.0
Event History
Frequently Asked Questions
Which deployments are exposed to unauthenticated access?
Applications using kin-openapi before version 0.144.0 are exposed if they rely on ValidationHandler as enforcement middleware and leave its AuthenticationFunc nil. In that configuration, requests can be forwarded to handlers protected by OpenAPI security requirements without credentials being checked.
Does exploitation require credentials or user interaction?
No. The issue is remotely exploitable with low attack complexity, requires no privileges or user interaction, and can allow unauthenticated requests to satisfy configured OpenAPI security requirements.
What should teams do if they cannot upgrade immediately?
Configure ValidationHandler with a non-nil AuthenticationFunc that validates the applicable credentials and rejects unauthenticated requests. Do not rely on the nil callback behavior, because affected versions replace it with NoopAuthenticationFunc.
How can teams determine whether they are affected?
Check whether the application uses github.com/getkin/kin-openapi before 0.144.0 and uses ValidationHandler as its authorization enforcement middleware. Then verify whether AuthenticationFunc is unset or nil; affected versions silently substitute the no-op authentication callback in that case.