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

CVE-2026-100352: kin-openapi YAML Parsing DOS Vulnerability

CVE-2026-100352 is a denial of service vulnerability in the kin-openapi Go library that allows remote attackers to crash applications by sending specially crafted YAML requests with NaN or infinity values. This article covers technical details, affected versions, impact assessment, and mitigation strategies.

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

CVE-2026-100352 is a high-severity denial-of-service vulnerability in kin-openapi, a Go library for parsing and validating OpenAPI specifications. Versions prior to 0.148.0 pass YAML NaN and infinity numeric values to santhosh-tekuri/jsonschema v6.0.2 without applying the library's existing finite-number guards. A remote unauthenticated attacker can submit a YAML request body containing .nan, .inf, or -.inf targeting an operation with a numeric constraint. The dependency creates and dereferences a nil big.Rat, triggering a panic during ValidateRequest. The weakness is tracked as [CWE-754: Improper Check for Unusual or Exceptional Conditions].

Critical Impact

Remote unauthenticated attackers can crash application processes or terminate goroutines by sending a crafted YAML payload to any OpenAPI 3.1 endpoint with numeric schema constraints.

Affected Products

  • github.com/getkin/kin-openapi versions prior to 0.148.0
  • Go services performing OpenAPI 3.1 request validation via kin-openapi
  • Applications accepting application/yaml or application/x-yaml content types

Discovery Timeline

  • 2026-10-15 - CVE-2026-100352 published to NVD
  • 2026-10-20 - Last updated in NVD database

Technical Details for CVE-2026-100352

Vulnerability Analysis

The flaw lives in the OpenAPI 3.1 validation path within kin-openapi. The library maintains finite-number guards for JSON input but does not apply them to YAML-decoded numeric values. When a YAML body contains the special floats .nan, .inf, or -.inf, those values flow unchecked into the downstream JSON Schema validator santhosh-tekuri/jsonschema v6.0.2. Inside the dependency, the non-finite values cause construction of a big.Rat that is never initialized, producing a nil pointer. Subsequent arithmetic dereferences the nil value and panics.

The blast radius depends on the host runtime. Standard net/http servers recover panics on a per-connection basis, degrading availability for the targeted request. Other host frameworks, worker pools, or application goroutines that spawn validation outside the HTTP recover boundary may terminate the entire process. Any attacker with network access to an unauthenticated endpoint using numeric schema keywords such as minimum, maximum, multipleOf, or exclusiveMinimum can trigger the condition repeatedly.

Root Cause

The root cause is an incomplete input validation boundary. kin-openapi sanitizes finite-number inputs on the JSON path but omits equivalent handling for YAML-decoded floats. Non-finite IEEE 754 values reach santhosh-tekuri/jsonschema v6.0.2, which does not defensively check for nil before dereferencing a big.Rat constructed from those values.

Attack Vector

An unauthenticated remote client sends an HTTP request with Content-Type: application/yaml (or application/x-yaml) and a body containing a YAML non-finite float mapped to a schema field that enforces a numeric constraint. ValidateRequest panics during schema evaluation.

text
// Patch: go.mod dependency bump
 	github.com/gorilla/mux v1.8.0
 	github.com/oasdiff/yaml v0.1.1
 	github.com/oasdiff/yaml3 v0.0.14
-	github.com/santhosh-tekuri/jsonschema/v6 v6.0.2
+	github.com/santhosh-tekuri/jsonschema/v6 v6.0.3
 	github.com/stretchr/testify v1.9.0

Source: GitHub commit 4487f198

The fix in kin-openapi0.148.0 upgrades the vulnerable transitive dependency to santhosh-tekuri/jsonschema/v6 v6.0.3, which adds nil safety for non-finite numeric inputs.

Detection Methods for CVE-2026-100352

Indicators of Compromise

  • HTTP requests with Content-Type: application/yaml or application/x-yaml containing the literals .nan, .inf, or -.inf.
  • Go runtime panic logs referencing big.Rat nil pointer dereferences inside santhosh-tekuri/jsonschema/v6.
  • Abnormal process restarts or increased 5xx error rates on services exposing OpenAPI 3.1 validated endpoints.

Detection Strategies

  • Inspect ingress logs and WAF telemetry for YAML request bodies containing non-finite float literals targeting numeric fields.
  • Use software composition analysis (SCA) to flag any Go module graph pinning github.com/getkin/kin-openapi below 0.148.0 or santhosh-tekuri/jsonschema/v6 at v6.0.2.
  • Monitor application stack traces for panic signatures in the jsonschema and kin-openapi call paths during request validation.

Monitoring Recommendations

  • Correlate spikes in dropped connections or process restarts with the presence of YAML content types in traffic.
  • Alert on repeated validation panics originating from the same source IP within short time windows.
  • Track dependency drift in CI pipelines so vulnerable kin-openapi versions cannot be reintroduced.

How to Mitigate CVE-2026-100352

Immediate Actions Required

  • Upgrade github.com/getkin/kin-openapi to version 0.148.0 or later across all Go services.
  • Rebuild and redeploy affected binaries; a transitive dependency update alone is insufficient without the kin-openapi bump.
  • Audit all services that accept YAML content types and perform OpenAPI 3.1 validation.

Patch Information

The maintainers released the fix in kin-openapi v0.148.0. The patch bumps santhosh-tekuri/jsonschema/v6 from v6.0.2 to v6.0.3. See the GHSA-rj39-cv6w-8wv7 advisory for full details.

Workarounds

  • Reject requests with Content-Type: application/yaml or application/x-yaml at the gateway if YAML is not required.
  • Pre-filter inbound YAML bodies to strip or reject payloads containing .nan, .inf, or -.inf tokens.
  • Wrap ValidateRequest callers in panic recovery and ensure non-HTTP goroutines performing validation also recover panics.
bash
# Upgrade kin-openapi to the fixed release
go get github.com/getkin/kin-openapi@v0.148.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.