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

CVE-2026-100353: kin-openapi DoS Vulnerability

CVE-2026-100353 is a denial of service flaw in kin-openapi that allows remote attackers to trigger nil-pointer panics through crafted array parameters. This post explains its technical details, 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-100353 Overview

CVE-2026-100353 is a nil pointer dereference vulnerability in kin-openapi, a Go library for handling OpenAPI 3 files. The flaw affects versions 0.136.0 through 0.148.x and resides in three openapi3filter decoder paths missed by the previous fix for GHSA-p6wj-qrr4-pgh5. An unauthenticated remote attacker can trigger a deterministic nil-pointer panic by sending a crafted array query parameter, a deepObject query parameter containing an array property, or an application/x-www-form-urlencoded body with an array property nested inside allOf, anyOf, or oneOf. The issue is tracked as [CWE-476] and resolved in version 0.149.0.

Critical Impact

Remote unauthenticated denial of service against any Go service that uses kin-openapiopenapi3filter to validate requests against OpenAPI 3.1 schemas containing array types without explicit items.

Affected Products

  • kin-openapi versions >= 0.136.0 and < 0.149.0
  • Go HTTP services relying on openapi3filter for request validation
  • Applications exposing OpenAPI 3.1 schemas with array parameters or allOf/anyOf/oneOf composed bodies

Discovery Timeline

Technical Details for CVE-2026-100353

Vulnerability Analysis

The vulnerability affects three decoder paths in openapi3filter that validate incoming HTTP data against OpenAPI 3.1 array schemas. OpenAPI 3.1 permits array schemas without an explicit items keyword, which is legal but leaves SchemaRef.Value.Items as nil. The query and composed-body paths reach urlValuesDecoder.parseArray, while the deepObject path reaches buildResObj. Both call sites dereference the Items field without a nil guard, producing a runtime panic. Because Go HTTP handlers that panic terminate the goroutine and often the process when unrecovered, remote clients can repeatedly crash validator-backed endpoints. The fix for GHSA-p6wj-qrr4-pgh5 added similar guards elsewhere but missed these three paths.

Root Cause

The root cause is a missing nil check on schemaRef.Value.Items and schemaRef.Value.Items.Value before dereference. OpenAPI 3.1 allows array schemas with no items, but the decoder assumed items were always present, violating a safe-dereference invariant [CWE-476].

Attack Vector

An unauthenticated remote attacker sends one of three crafted inputs to a vulnerable endpoint: an array-typed query parameter, a deepObject query parameter whose property is an array, or a application/x-www-form-urlencoded body whose array property is composed inside allOf, anyOf, or oneOf. The decoder dereferences a nil items schema and panics, interrupting request processing.

go
// Patch excerpt from openapi3filter/req_resp_decoder.go
// Every item is parsed as a primitive value.
// The function returns an error when an error happened while parse array's items.
func (d *urlValuesDecoder) parseArray(raw []string, schemaRef *openapi3.SchemaRef) ([]any, error) {
	if schemaRef.Value.Items == nil || schemaRef.Value.Items.Value == nil {
		return nil, errors.New("array items schema is required for decoding")
	}
	var value []any

	for i, v := range raw {

Source: GitHub commit 9814d1f

Detection Methods for CVE-2026-100353

Indicators of Compromise

  • Repeated Go runtime panics referencing openapi3filter.urlValuesDecoder.parseArray or buildResObj in service logs
  • runtime error: invalid memory address or nil pointer dereference stack traces originating from request validation middleware
  • Abnormal 5xx spikes correlated with requests containing array query parameters, deepObject style parameters, or form-encoded bodies with allOf/anyOf/oneOf schemas

Detection Strategies

  • Inventory Go services and dependency manifests (go.mod, go.sum) for github.com/getkin/kin-openapi at versions >= 0.136.0 and < 0.149.0
  • Instrument HTTP middleware with panic recovery that emits structured logs, then alert on panic frames matching openapi3filter symbols
  • Audit served OpenAPI documents for array schemas lacking items, which indicates exposure to the vulnerable code paths

Monitoring Recommendations

  • Monitor process restart rates and goroutine panic counters on API gateways and validator services
  • Alert on sudden 5xx error-rate increases on endpoints that accept array or composed-schema parameters
  • Capture and retain request payloads that preceded panics to support root-cause analysis

How to Mitigate CVE-2026-100353

Immediate Actions Required

  • Upgrade github.com/getkin/kin-openapi to version 0.149.0 or later and redeploy affected services
  • Enforce panic recovery in HTTP middleware so a single malformed request cannot terminate the handler goroutine or process
  • Validate OpenAPI documents at build time to reject array schemas missing an items definition where feasible

Patch Information

The fix is included in kin-openapi version 0.149.0. The patch adds explicit nil checks for schemaRef.Value.Items and schemaRef.Value.Items.Value in urlValuesDecoder.parseArray and the corresponding deepObject resolution path. See GHSA-vrcc-3ch7-hppw and the commit 9814d1f for the exact code change.

Workarounds

  • Pre-process OpenAPI schemas to inject a default items definition (for example, { "type": "string" }) for every array schema before loading them into openapi3filter
  • Deploy a reverse proxy or WAF rule to reject requests that contain array query parameters or deepObject parameters against endpoints whose schemas omit items
  • Wrap request validation in a defer/recover block that returns a 400 response instead of propagating the panic
bash
# Upgrade kin-openapi to the patched version
go get github.com/getkin/kin-openapi@v0.149.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.