Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-100351 Overview
CVE-2026-100351 is an authentication bypass vulnerability in kin-openapi, a Go library for handling OpenAPI files. The flaw affects versions 0.144.0 through 0.146.x and is fixed in 0.147.0. The openapi3filter.ValidationHandler validates an operation selected from the decoded URL.Path, while a downstream gorilla/mux router configured with UseEncodedPath can dispatch a different operation selected from URL.RawPath. When a public exact route and a protected parameterized route share the same method and overlap after decoding, an unauthenticated request containing an encoded path separator can be validated as public and routed to the protected handler without invoking the configured AuthenticationFunc.
Critical Impact
Unauthenticated remote attackers can reach protected handlers in Go services that combine kin-openapi validation with a gorilla/mux router using UseEncodedPath, bypassing the application's authentication layer entirely.
Affected Products
- kin-openapi versions 0.144.0 through 0.146.x
- Go services using openapi3filter.ValidationHandler with a gorilla/mux router configured with UseEncodedPath
- APIs defining overlapping public literal and protected parameterized routes on the same HTTP method
Discovery Timeline
- 2026-10-15 - CVE-2026-100351 published to the National Vulnerability Database (NVD)
- 2026-10-15 - Last updated in NVD database
- Fixed inv0.147.0 - Patch released via commit eda80e2676e9f577ceed2dd80e64f16083edb041
Technical Details for CVE-2026-100351
Vulnerability Analysis
The vulnerability is an authentication bypass classified under [CWE-289] (Authentication Bypass by Alternate Name). kin-openapi selects the OpenAPI operation for validation by matching the decoded URL.Path. The downstream router can be configured to match on the raw, undecoded path. This parsing disagreement creates a request smuggling-style mismatch between the validator and the router.
An attacker crafts a URI where the decoded form matches a public, unauthenticated route and the raw form matches a protected, authenticated route. The validator sees the public operation, skips AuthenticationFunc, and forwards the request. The router then dispatches it to the protected handler. The reachable protected path parameter is constrained to encoded values that decode to the public literal, which limits exploitability but does not eliminate it.
Root Cause
The root cause is inconsistent URI normalization between the OpenAPI validation layer and the HTTP router. openapi3filter.ValidationHandler uses URL.Path (decoded) for route selection, while gorilla/mux with UseEncodedPath enabled uses URL.RawPath. When these two values resolve to different OpenAPI operations, security policy enforcement is applied to the wrong operation.
Attack Vector
Exploitation is remote and unauthenticated over the network. The attacker sends an HTTP request whose path contains an encoded path separator (for example, %2F) placed such that the decoded path matches a public exact route and the raw path matches a protected parameterized route sharing the same method. Proxies that canonicalize URIs before forwarding neutralize this specific mismatch.
// Patch excerpt from openapi3filter/validation_handler.go (v0.147.0)
import (
"context"
"net/http"
+ "strings"
"github.com/getkin/kin-openapi/openapi3"
"github.com/getkin/kin-openapi/routers"
Source: GitHub commit eda80e2
// New sentinel error introduced by the fix
+var ErrEncodedPathSeparator error = &routers.RouteError{Reason: "path contains an encoded path separator resolving to another operation"}
+ ErrEncodedPathSeparator is returned when a request path holds an encoded
+ path separator and the decoded path resolves to another operation than the
+ escaped path does. Serving such a request would validate one operation while
+ the wrapped handler serves the other one.
Source: GitHub commit eda80e2
Detect Identity Attacks the Moment Authentication Fails
Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.
Stop Identity AttacksDetection Methods for CVE-2026-100351
Indicators of Compromise
- HTTP request paths containing encoded path separators such as %2F or %2f targeting routes that overlap between public and protected OpenAPI operations.
- Access log entries where a protected handler executed successfully but no corresponding authentication event was recorded.
- Requests whose decoded path matches a documented public endpoint but whose raw path matches a parameterized protected endpoint.
Detection Strategies
- Audit application and reverse-proxy logs for requests containing %2F, %2f, or other percent-encoded reserved characters in path segments.
- Correlate OpenAPI validation decisions with downstream handler dispatch records to flag mismatches between validated and served operations.
- Perform targeted vulnerability scanning against Go services using kin-openapi versions 0.144.0 through 0.146.x combined with gorilla/mux.
Monitoring Recommendations
- Ingest API gateway, reverse-proxy, and application logs into a centralized analytics platform and alert on anomalous use of encoded path separators.
- Track the ratio of authenticated versus unauthenticated calls per protected route and alert on unexpected unauthenticated hits.
- Monitor dependency manifests (go.mod, go.sum) across build pipelines to detect vulnerable kin-openapi versions reintroduced into production.
How to Mitigate CVE-2026-100351
Immediate Actions Required
- Upgrade kin-openapi to version 0.147.0 or later across all affected Go services.
- Inventory all services that import openapi3filter and gorilla/mux with UseEncodedPath enabled and prioritize them for patching.
- Place a URI-canonicalizing reverse proxy in front of affected services as a compensating control until patching completes.
Patch Information
The fix is included in kin-openapiv0.147.0 via commit eda80e2. The patch introduces the ErrEncodedPathSeparator sentinel error, which is returned when a request path contains an encoded path separator and the decoded path resolves to an operation different from the escaped path. Full technical details are published in GitHub Security Advisory GHSA-23vg-4cjm-66q5.
Workarounds
- Deploy a front-end proxy that canonicalizes URIs (decoding reserved characters) before forwarding requests to the Go service.
- Reconfigure the gorilla/mux router to disable UseEncodedPath so routing matches on the decoded path, aligning it with kin-openapi validation.
- Restructure the OpenAPI definition to eliminate overlaps between public literal routes and protected parameterized routes sharing the same HTTP method.
# Update kin-openapi to the patched release
go get github.com/getkin/kin-openapi@v0.147.0
go mod tidy
# Verify the resolved version in your module graph
go list -m github.com/getkin/kin-openapi
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

