kin-openapi: Uncontrolled Recursion on Circular allOf/anyOf/oneOf Schemas Causes Fatal Process Crash
Collected exploitation and prediction evidence
Risk source coverageCISA KEV is observed exploitation evidence. FIRST EPSS is a dated prediction of exploitation in the next 30 days. Missing scores are unknown. This collector requests predictions only for explicit CVE aliases in the public NuGet archive; Microsoft release views retain their existing prediction scope.
No collected risk observation for these identifiers. This does not establish absence of exploitation or a zero probability.
cve-program · CVE-2026-100354
Publishedkin-openapi is a Go project for handling OpenAPI files. Prior to 0.149.0, runtime request, response, and direct schema validation lacks cycle detection when an allOf, anyOf, or oneOf chain refers back to an ancestor schema, even though loading and document validation accept the circular reference. A request or response that reaches the affected schema causes unbounded recursion in Schema.visitJSON or openapi3filter.decodeValue and exhausts the Go goroutine stack. The resulting fatal stack overflow cannot be caught with recover and terminates the entire process, including unrelated requests. This issue is fixed in version 0.149.0.
- Source published
- 15 Oct 2026 16:02:00 UTC
- Source modified
- 15 Oct 2026 18:31:51 UTC
- Observed here
- 23 Oct 2026 15:48:27 UTC
- Source terms
- CVE Program Terms of Use
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: cve-program · CVE Program Terms of Use. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS 3.1 · 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
euvd · EUVD-2026-102162
Publishedkin-openapi is a Go project for handling OpenAPI files. Prior to 0.149.0, runtime request, response, and direct schema validation lacks cycle detection when an allOf, anyOf, or oneOf chain refers back to an ancestor schema, even though loading and document validation accept the circular reference. A request or response that reaches the affected schema causes unbounded recursion in Schema.visitJSON or openapi3filter.decodeValue and exhausts the Go goroutine stack. The resulting fatal stack overflow cannot be caught with recover and terminates the entire process, including unrelated requests. This issue is fixed in version 0.149.0.
EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.
Original publisher date fields
datePublished: Oct 15, 2026, 4:02:00 PM
dateUpdated: Oct 15, 2026, 6:31:51 PM
6 related source bulletins · separate from aliases
RHSA-2026:87077: Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update
CVE-2026-15577 · CVE-2026-33374 · CVE-2026-92539 · CVE-2026-93294 · CVE-2026-95502 · CVE-2026-100347 · CVE-2026-100348 · CVE-2026-100349 · CVE-2026-100351 · CVE-2026-100352 · CVE-2026-100353 · CVE-2026-100354 · CVE-2026-110816
RHSA-2026:85266: Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update
CVE-2026-93450 · CVE-2026-100347 · CVE-2026-100348 · CVE-2026-100349 · CVE-2026-100351 · CVE-2026-100352 · CVE-2026-100353 · CVE-2026-100354 · CVE-2026-110816
RHSA-2026:90388: Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update
CVE-2026-65627 · CVE-2026-100352 · CVE-2026-100353 · CVE-2026-100354 · CVE-2026-110095 · CVE-2026-110180 · CVE-2026-110306 · CVE-2026-110725 · CVE-2026-110816 · CVE-2026-111181
openSUSE-SU-2026:12309-1: timoni-0.36.0-1.1 on GA media
CVE-2024-45338 · CVE-2025-22872 · CVE-2025-47911 · CVE-2025-58190 · CVE-2026-100351 · CVE-2026-100352 · CVE-2026-100353 · CVE-2026-100354 · CVE-2026-33186 · CVE-2026-78659 · CVE-2026-78660 · CVE-2026-78663 · CVE-2026-78669 · CVE-2026-97032
RHSA-2026:91292: Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update
CVE-2026-79656 · CVE-2026-100352 · CVE-2026-100353 · CVE-2026-100354 · CVE-2026-103506 · CVE-2026-110095 · CVE-2026-110180 · CVE-2026-110306 · CVE-2026-110725 · CVE-2026-111181
RHSA-2026:82637: Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update
CVE-2026-97394 · CVE-2026-100347 · CVE-2026-100348 · CVE-2026-100349 · CVE-2026-100350 · CVE-2026-100351 · CVE-2026-100352 · CVE-2026-100353 · CVE-2026-100354
- Source published
- Oct 15, 2026, 4:02:00 PM (timezone not stated)
- Source modified
- Oct 15, 2026, 6:31:51 PM (timezone not stated)
- Observed here
- 9 Nov 2026 04:15:18 UTC
- Source terms
- ENISA EUVD · source terms and attribution apply
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: euvd · ENISA EUVD · source terms and attribution apply. Source text is retained; field grouping and change labels are provided by ChangeIntel.
EUVD CVSS 3.1 · 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
nvd · CVE-2026-100354
Publishedkin-openapi is a Go project for handling OpenAPI files. Prior to 0.149.0, runtime request, response, and direct schema validation lacks cycle detection when an allOf, anyOf, or oneOf chain refers back to an ancestor schema, even though loading and document validation accept the circular reference. A request or response that reaches the affected schema causes unbounded recursion in Schema.visitJSON or openapi3filter.decodeValue and exhausts the Go goroutine stack. The resulting fatal stack overflow cannot be caught with recover and terminates the entire process, including unrelated requests. This issue is fixed in version 0.149.0.
NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.
Source analysis status: Deferred
Weakness classifications: CWE-674
Original publisher date fields
published: 2026-10-15T17:17:07.780
lastModified: 2026-10-15T19:17:12.943
- Source published
- 15 Oct 2026 17:17:07 UTC
- Source modified
- 15 Oct 2026 19:17:12 UTC
- Observed here
- 25 Oct 2026 04:17:26 UTC
- Source terms
- NIST NVD usage terms; underlying source attribution retained
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: nvd · NIST NVD usage terms; underlying source attribution retained. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS 3.1 · [email protected] · Secondary · 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
osv · GHSA-g8cf-rcjf-c8cf
Published## Summary kin-openapi's spec loader and spec-time validator both handle circular schema references safely: the loader resolves circular `$ref`s on purpose (to support recursive data structures), and `Schema.validate()` uses stack-based cycle detection. `Validate()` therefore accepts a schema whose `allOf` / `anyOf` / `oneOf` chain refers back to itself, returning no error. The runtime validators do not have that protection. When such a schema is used for request or response validation, the recursion through the combinator chain is unbounded. In Go this produces a **fatal stack overflow** (`runtime: goroutine stack exceeds ... limit` / `fatal error: stack overflow`), which is **not** a recoverable panic. `recover()` cannot catch it, so `net/http`'s per-connection recovery does not help. The entire process is terminated, including all goroutines serving unrelated clients. Two independent unguarded recursion sites were confirmed: 1. `openapi3/schema.go` — `visitJSON` / `visitXOFOperations` (reached by `VisitJSON`, i.e. response validation and direct schema validation). 2. `openapi3filter/req_resp_decoder.go` — `decodeValue` (reached first during request parameter decoding). The report also identifies the same gap in `urlValuesDecoder.parseValue` and `buildResObj`/`buildFromSchemas`. ## Details ### Root Cause `Schema.validate()` has cycle detection (`openapi3/schema.go:1396`): ```go func (schema *Schema) validate(ctx context.Context, stack []*Schema) ([]*Schema, error) { if slices.Contains(stack, schema) { return stack, nil } // ... stack = append(stack, schema) ``` The runtime visitor has none. `visitJSON` (line 1951) calls `visitXOFOperations` (line 2189), which iterates the combinator slice and calls `visitJSON` again on each sub-schema: ```go func (schema *Schema) visitXOFOperations(settings *schemaValidationSettings, value any) (err error, run bool) { // ... for idx, item := range v { // v = schema.OneOf / AnyOf / AllOf v := item.Value // no check for item.Value == schema (or any ancestor) if err := v.visitJSON(settings, tempValue); err != nil { // recurses forever on a cycle ``` The request-decoding path has the same structure in `decodeValue` (`openapi3filter/req_resp_decoder.go:270`): ```go func decodeValue(dec valueDecoder, param string, sm *openapi3.SerializationMethod, schema *openapi3.SchemaRef, required bool) (any, bool, error) { if len(schema.Value.AllOf) > 0 { for _, sr := range schema.Value.AllOf { value, f, err = decodeValue(dec, param, sm, sr, required) // no cycle check ``` ## Proof of Concept ### Environment - kin-openapi v0.144.0 (tag `v0.144.0`, commit `f0407d5`) - Go 1.26.7 ### Path A: response / direct schema validation (`VisitJSON`) A schema whose `allOf` refers to itself. `Validate()` is called first to show the schema is accepted, then `VisitJSON()`: ```go recursiveSchema := &openapi3.Schema{ Type: &openapi3.Types{"object"}, Properties: openapi3.Schemas{"name": {Value: &openapi3.Schema{Type: &openapi3.Types{"string"}}}}, } recursiveSchema.AllOf = openapi3.SchemaRefs{{Value: recursiveSchema}} // circular _ = recursiveSchema.Validate(ctx) // accepted, no error _ = recursiveSchema.VisitJSON(map[string]any{"name": "test"}) // crashes ``` Output: ``` Validate() ACCEPTED the circular schema (no error) -- spec-time cycle detection tolerates it Calling VisitJSON() -- expect fatal stack overflow (unrecoverable)... runtime: goroutine stack exceeds 1000000000-byte limit fatal error: stack overflow goroutine 1 [running]: github.com/getkin/kin-openapi/openapi3.(*Schema).visitJSON(...) openapi3/schema.go:1951 github.com/getkin/kin-openapi/openapi3.(*Schema).visitXOFOperations(...) openapi3/schema.go:2309 github.com/getkin/kin-openapi/openapi3.(*Schema).visitJSON(...) openapi3/schema.go:1981 github.com/getkin/kin-openapi/openapi3.(*Schema).visitXOFOperations(...) openapi3/schema.go:2309 ... (repeats until stack overflow) ``` A `defer recover()` placed around the call did **not** catch the fatal error — the process aborted with a non-zero exit code, confirming it is unrecoverable. ### Path B: HTTP request validation against a loaded spec (realistic delivery) A legal OAS 3.0 spec with a circular `allOf` `$ref`, loaded normally, served behind a standard `net/http` handler using `openapi3filter.ValidateRequest`: ```yaml openapi: '3.0.0' info: { title: Circular allOf crash PoC, version: '1.0' } paths: /test: get: parameters: - name: data in: query schema: { $ref: '#/components/schemas/Recursive' } responses: { '200': { description: OK } } components: schemas: Recursive: type: object allOf: - $ref: '#/components/schemas/Recursive' properties: name: { type: string } ``` A single `GET /test?data=x` crashes the whole server process: ``` Validate() ACCEPTED the spec with circular allOf $ref Sending GET /test?data=x through a real net/http server... runtime: goroutine stack exceeds 1000000000-byte limit fatal error: stack overflow ... github.com/getkin/kin-openapi/openapi3filter.decodeValue(...) openapi3filter/req_resp_decoder.go:278 github.com/getkin/kin-openapi/openapi3filter.decodeValue(...) openapi3filter/req_resp_decoder.go:278 ... (repeats until stack overflow) ``` The line printed after the request ("the process survived") was never reached, and the process exited with a non-zero code — the standard `net/http` per-connection `recover()` did not save it. This is the key distinction from a recoverable panic: a fatal stack overflow takes the entire process down regardless of host. ### Fix verification Adding stack-based cycle detection to both sites (matching `validate()`'s pattern) eliminated the crash: - `visitJSON` guard: `VisitJSON()` returned normally instead of crashing. - `decodeValue` guard: the same `GET /test?data=x` returned a clean `400`: ``` Response: 400 "invalid: parameter \"data\" in query has an error: circular schema reference detected while decoding" If you see this line, the process survived. ``` ## Impact An unrecoverable, whole-process denial of service. Because the crash is a fatal Go runtime error (not a panic), it cannot be contained by `net/http`'s per-request recovery, so **A:H applies to all host types**, unlike a recoverable-panic bug. Attack surface, in order of exposure: - **Applications that load OpenAPI specs from untrusted or semi-trusted sources** (API gateways, spec linters/validators, mock servers, documentation generators). An attacker supplies a spec containing a circular combinator, and any subsequent request/response validation crashes the service. This is the primary remote-attacker scenario. - **Applications serving a fixed, trusted spec that happens to contain a circular `allOf`/`anyOf`/`oneOf`.** Here any client request to the affected endpoint crashes the process. The spec author does not need malicious intent; a degenerate recursive combinator is enough. This is a latent reliability bug that becomes remotely triggerable once present.
- Source published
- 15 Oct 2026 20:20:37 UTC
- Source modified
- 5 Nov 2026 23:26:08 UTC
- Observed here
- 5 Nov 2026 23:38:32 UTC
- Source terms
- GitHub Advisory Database · CC-BY-4.0
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: osv · GitHub Advisory Database · CC-BY-4.0. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS_V3 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Publisher rating · HIGH
osv · GO-2026-6785
Publishedkin-openapi: Uncontrolled Recursion on Circular allOf/anyOf/oneOf Schemas Causes Fatal Process Crash in github.com/getkin/kin-openapi
- Source published
- 5 Nov 2026 22:53:53 UTC
- Source modified
- 5 Nov 2026 23:15:12 UTC
- Observed here
- 5 Nov 2026 23:38:32 UTC
- Source terms
- OSV · upstream source license applies
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: osv · OSV · upstream source license applies. Source text is retained; field grouping and change labels are provided by ChangeIntel.