Skip to main content
Vulnerability Database/CVE-2026-100347

CVE-2026-100347: kin-openapi DoS Vulnerability

CVE-2026-100347 is a denial of service vulnerability in kin-openapi that allows unauthenticated attackers to crash services by sending unsupported HTTP methods. This article covers technical details, affected versions, and mitigation.

Published:

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-100347 Overview

CVE-2026-100347 is a denial-of-service vulnerability in kin-openapi, a Go library for parsing and validating OpenAPI documents. Versions prior to 0.145.0 panic when openapi3filter.ValidationHandler receives an unsupported or non-canonical HTTP method on an existing static path. The legacy router forwards the request to openapi3.PathItem.GetOperation, whose default branch calls panic before authentication runs. An unauthenticated remote attacker can repeatedly send methods such as PROPFIND or lowercase get to abort connections and inflate stack-trace logs. The issue is fixed in 0.145.0.

Critical Impact

Unauthenticated remote attackers can crash request-handling goroutines and generate unbounded log growth, degrading availability of services built on kin-openapi.

Affected Products

  • getkin/kin-openapi versions prior to 0.145.0
  • Go services using openapi3filter.ValidationHandler with the legacy router
  • Applications relying on openapi3.PathItem.GetOperation for request dispatch

Discovery Timeline

  • 2026-10-15 - CVE-2026-100347 published to the National Vulnerability Database (NVD)
  • 2026-10-15 - Last updated in NVD database

Technical Details for CVE-2026-100347

Vulnerability Analysis

The flaw is an input validation error [CWE-20] in the request-method dispatch logic. openapi3filter.ValidationHandler relies on the routers/legacy router, which forwards the raw HTTP method to openapi3.PathItem.GetOperation. That function uses a switch statement mapping canonical uppercase methods (GET, PUT, POST, etc.) to the corresponding operation fields. Any method falling outside this set hits the default branch, which calls panic(fmt.Errorf("unsupported HTTP method %q", method)).

Because the panic fires before authentication or authorization middleware executes, an unauthenticated client can trigger it at will. Each request produces a full Go stack trace in server logs, driving disk and ingest costs upward. The panic condition requires an exact static path match; concrete paths that resolve only through templated routes do not reach the vulnerable sink.

Root Cause

The root cause is the use of panic as the error signal for an attacker-controlled input. HTTP method strings are arbitrary tokens supplied by clients, so treating unknown values as unrecoverable programming errors is inappropriate. The handler also failed to normalize case before dispatch, so values such as lowercase get were classified as unsupported.

Attack Vector

An attacker sends HTTP requests to any valid static route exposed by a service that uses openapi3filter.ValidationHandler. The request method must be either non-canonical (for example PROPFIND, MKCOL, LOCK) or an unexpected casing of a standard verb (get, post). The server-side goroutine panics, the connection is aborted, and the stack trace is written to logs.

go
// Patch: openapi3/path_item.go
 	case http.MethodTrace:
 		return pathItem.Trace
 	default:
-		panic(fmt.Errorf("unsupported HTTP method %q", method))
+		return nil
 	}
 }
go
// Patch: openapi2/path_item.go
 	case http.MethodPut:
 		return pathItem.Put
 	default:
-		panic(fmt.Errorf("unsupported HTTP method %q", method))
+		return nil
 	}
 }

Source: GitHub Commit f1a5b52. The fix replaces the panic with a nil return, allowing callers to handle unknown methods as a routing miss.

Detection Methods for CVE-2026-100347

Indicators of Compromise

  • Repeated HTTP requests from the same source using uncommon methods such as PROPFIND, MKCOL, COPY, or LOCK against known API endpoints.
  • Server logs containing the string unsupported HTTP method followed by a Go stack trace referencing openapi3.PathItem.GetOperation or openapi3filter.ValidationHandler.
  • Sudden growth in log volume or disk usage on API gateways using kin-openapi.

Detection Strategies

  • Inspect access logs for mixed-case or non-RFC HTTP methods targeting static OpenAPI-defined paths.
  • Alert on repeated panic or runtime error entries in Go application logs correlated with external client IP addresses.
  • Query dependency manifests (go.mod, go.sum) across repositories for github.com/getkin/kin-openapi at versions below 0.145.0.

Monitoring Recommendations

  • Track HTTP method distribution per route and flag spikes in non-standard verbs.
  • Monitor goroutine panic counters and process restart events on services that embed the library.
  • Correlate connection resets (RST) and premature TCP FIN from the server with request methods captured at the proxy layer.

How to Mitigate CVE-2026-100347

Immediate Actions Required

  • Upgrade github.com/getkin/kin-openapi to version 0.145.0 or later in all Go modules and rebuild affected services.
  • Audit downstream dependencies that vendor kin-openapi and ensure transitive versions are also updated.
  • Rotate or truncate log stores that have grown due to repeated panic stack traces.

Patch Information

The fix is published in GitHub Release v0.145.0 with full remediation details in GitHub Security Advisory GHSA-fh4f-47mf-f2gj. The patch changes the default branch of GetOperation in both openapi2/path_item.go and openapi3/path_item.go to return nil instead of panicking.

Workarounds

  • Deploy a reverse proxy or Web Application Firewall (WAF) rule that rejects HTTP methods outside the application's expected set before requests reach the Go service.
  • Normalize incoming method strings to uppercase at the ingress layer and drop non-canonical verbs.
  • Wrap openapi3filter.ValidationHandler with middleware that recovers panics and logs a single structured event instead of a full stack trace.
bash
# Update to the patched release
go get github.com/getkin/kin-openapi@v0.145.0
go mod tidy
go build ./...

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

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.