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-97394 Overview
CVE-2026-97394 is a nil pointer dereference vulnerability in kin-openapi, a Go library for handling OpenAPI specification files. The flaw affects openapi3filter versions 0.136.0 through 0.142.x and is fixed in 0.143.0. The filter accepts OpenAPI 3.1 array schemas that omit the required items keyword, then dereferences the nil Schema.Items value when decoding application/x-www-form-urlencoded or multipart/form-data request bodies, response headers, and other array parameter surfaces. A remote unauthenticated attacker can trigger a deterministic panic during ValidateRequest or ValidateResponse, crashing the host process [CWE-248].
Critical Impact
Any unauthenticated client reaching an affected API operation can crash the Go process, producing a reliable denial of service against services that embed kin-openapi for request validation.
Affected Products
- getkin/kin-openapi versions 0.136.0 through 0.142.x
- OPNsense components depending on the affected kin-openapi releases
- Go services using openapi3filter with OpenAPI 3.1 documents containing array schemas
Discovery Timeline
- 2026-10-15 - CVE-2026-97394 published to NVD
- 2026-10-20 - Last updated in NVD database
Technical Details for CVE-2026-97394
Vulnerability Analysis
The vulnerability lives in the request and response decoder path of openapi3filter. OpenAPI 3.1 relaxed the schema rules of its predecessor and permits array schemas that lack an items keyword at document validation time. The decoder in kin-openapi did not account for this difference. When it processes array parameters from form bodies, response headers, or similar surfaces, it directly dereferences schemaRef.Value.Items.Value without checking for nil.
Decoders for JSON request bodies take a different code path and are unaffected. OpenAPI 3.0 documents are also unaffected because the stricter 3.0 document validator rejects arrays without items before the decoder is reached. The crash is reachable from any application that calls ValidateRequest or ValidateResponse on an operation that references such a schema.
Root Cause
The root cause is a missing nil-check in parseArray inside openapi3filter/req_resp_decoder.go. The function assumed schemaRef.Value.Items and its nested Value field were always populated, which is only true for OpenAPI 3.0 documents.
Attack Vector
An unauthenticated remote attacker sends a request to an operation whose OpenAPI 3.1 specification defines an array parameter without items. The body must be application/x-www-form-urlencoded or multipart/form-data and contain a nonempty value for the array parameter. The decoder then panics, terminating the goroutine or process depending on how the host application handles panics.
// 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 parseArray(raw []string, schemaRef *openapi3.SchemaRef) ([]any, error) {
if schemaRef.Value.Items == nil || schemaRef.Value.Items.Value == nil {
return nil, fmt.Errorf("array items schema is required for decoding")
}
var value []any
for i, v := range raw {
item, err := parsePrimitive(v, schemaRef.Value.Items)
// ...
}
}
Source: GitHub commit 30e29237. The added guard returns an error instead of dereferencing a nil Items schema.
Detection Methods for CVE-2026-97394
Indicators of Compromise
- Go runtime panic messages referencing openapi3filter and parseArray in service logs
- Repeated process restarts or container crash loops correlated with inbound form-encoded or multipart requests
- HTTP 5xx bursts from endpoints that validate array parameters against OpenAPI 3.1 schemas
Detection Strategies
- Inventory Go services and dependencies for github.com/getkin/kin-openapi at versions 0.136.0 through 0.142.x using go.mod or SBOM data.
- Scan OpenAPI 3.1 documents in use for array schemas that omit the items keyword.
- Replay representative form-encoded requests in staging and watch for runtime error: invalid memory address or nil pointer dereference traces.
Monitoring Recommendations
- Alert on unexpected process restarts of API gateways and backend services that embed kin-openapi.
- Monitor spikes in multipart/form-data and application/x-www-form-urlencoded traffic that correlate with 5xx responses.
- Centralize Go panic stack traces in a logging pipeline and alert when openapi3filter frames appear.
How to Mitigate CVE-2026-97394
Immediate Actions Required
- Upgrade github.com/getkin/kin-openapi to version 0.143.0 or later in all Go modules.
- Rebuild and redeploy any binaries, container images, and OPNsense components that embed affected versions.
- Audit OpenAPI 3.1 specifications and add an items schema to every array definition.
Patch Information
The fix is published in kin-openapi release v0.143.0 and tracked in GHSA-p6wj-qrr4-pgh5. OPNsense users should consult GHSA-26cj-h9rj-g5pf for distribution-specific guidance. The code change adds a nil guard in parseArray within openapi3filter/req_resp_decoder.go.
Workarounds
- Convert affected OpenAPI documents to OpenAPI 3.0, which rejects arrays without items during document validation.
- Patch specifications to add explicit items schemas for every array parameter, request body field, and response header.
- Place a reverse proxy or WAF rule in front of affected services to reject form-encoded and multipart requests to operations with known missing items definitions.
# Update kin-openapi to the fixed release
go get github.com/getkin/kin-openapi@v0.143.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

