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

CVE-2026-100349: kin-openapi DOS Vulnerability

CVE-2026-100349 is a denial of service vulnerability in kin-openapi that causes application crashes through nil pointer dereference. This post explains its impact, affected versions, and mitigation steps.

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

CVE-2026-100349 is a nil pointer dereference vulnerability in kin-openapi, a Go library for parsing and validating OpenAPI 3 specifications. Versions prior to 0.146.0 crash when openapi3filter.ValidateResponse processes an OpenAPI document that declares a response header using content instead of schema. The validator passes a nil schema into decodeValue, which dereferences it and triggers a runtime panic. The crash occurs even when the response does not include the declared header. Applications that validate responses against untrusted specifications face remote availability impact, while applications using trusted local specifications still crash when the affected operation runs.

Critical Impact

Remote attackers can crash Go services that ingest attacker-controlled OpenAPI documents, producing a denial-of-service condition without authentication or user interaction.

Affected Products

  • kin-openapi versions prior to 0.146.0
  • Go applications using openapi3filter.ValidateResponse for response validation
  • Services that ingest third-party or user-supplied OpenAPI specifications

Discovery Timeline

  • 2026-10-15 - CVE-2026-100349 published to NVD
  • 2026-10-16 - Last updated in NVD database

Technical Details for CVE-2026-100349

Vulnerability Analysis

The flaw lives in openapi3filter/req_resp_decoder.go within the decodeValue function. OpenAPI 3 permits headers to be described with either a schema field or a content field. When a document uses content, the header's schema reference is nil. ValidateResponse forwards this nil SchemaRef to decodeValue, which immediately accesses schema.Value.AllOf without a nil check. The resulting panic terminates the goroutine and, in most server configurations, the handling process. This matches [CWE-476: NULL Pointer Dereference].

Root Cause

The validator assumes every header definition carries a resolvable schema reference. The OpenAPI 3 specification allows headers to be defined through content instead, and the parser accepts such documents as valid. No guard existed in decodeValue to confirm the schema pointer was non-nil before dereferencing it.

Attack Vector

An attacker supplies an OpenAPI document that declares a response header with a content entry and no schema. When the Go application loads the specification and later validates any response for the affected operation, the panic fires. Network reachability to a service that accepts third-party specifications is sufficient to achieve denial of service.

go
// Patch applied in openapi3filter/req_resp_decoder.go
func decodeValue(dec valueDecoder, param string, sm *openapi3.SerializationMethod, schema *openapi3.SchemaRef, required bool) (any, bool, error) {
	var found bool

	if schema == nil {
		return nil, false, nil
	}

	if len(schema.Value.AllOf) > 0 {
		var value any
		var err error

Source: GitHub Commit f5441d6. The fix adds an explicit nil check that short-circuits decodeValue when no schema is provided.

Detection Methods for CVE-2026-100349

Indicators of Compromise

  • Unexpected runtime error: invalid memory address or nil pointer dereference panics in Go process logs referencing openapi3filter stack frames.
  • Repeated process restarts or container crash loops correlated with incoming requests to endpoints backed by response validation.
  • Ingestion events for externally supplied OpenAPI documents immediately preceding service crashes.

Detection Strategies

  • Inventory Go modules for github.com/getkin/kin-openapi at versions below 0.146.0 using go list -m all or software composition analysis tooling.
  • Grep source trees for calls to openapi3filter.ValidateResponse to identify code paths exposed to the defect.
  • Static-scan OpenAPI documents for headers entries containing content without schema and flag them for review.

Monitoring Recommendations

  • Alert on Go runtime panic log patterns originating from the openapi3filter package across production workloads.
  • Track service availability metrics for API gateways and specification-ingestion services that consume third-party OpenAPI files.
  • Capture inbound OpenAPI uploads to a review queue so malformed or malicious specifications can be inspected before use.

How to Mitigate CVE-2026-100349

Immediate Actions Required

  • Upgrade github.com/getkin/kin-openapi to version 0.146.0 or later across all Go services.
  • Rebuild and redeploy binaries, then verify the updated version is live with go version -m <binary>.
  • Restrict OpenAPI specification ingestion to trusted sources until patched builds are rolled out.

Patch Information

The fix is available in kin-openapi v0.146.0. The code change is documented in GitHub Commit f5441d6 and the vendor advisory is tracked as GHSA-74vm-87hj-r66f. Update go.mod with go get github.com/getkin/kin-openapi@v0.146.0 and run go mod tidy.

Workarounds

  • Reject or preprocess OpenAPI documents that define response headers using content instead of schema before loading them.
  • Wrap calls to openapi3filter.ValidateResponse with recover() to prevent a single malformed operation from terminating the handler goroutine.
  • Disable response validation for operations backed by externally supplied specifications until the upgrade is applied.
bash
# Upgrade kin-openapi to the patched release
go get github.com/getkin/kin-openapi@v0.146.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.