kin-openapi spec loader panics on a self-referential additionalProperties $ref (nil-pointer DoS)
The defect ---------- Confirmed at HEAD (f0407d5, v0.144.0). openapi3/loader.go, inside resolveComponent's drill closure (around line 455), the case *SchemaRef branch for pathPart == "additionalProperties" dereferences c.Value.AdditionalProperties with no nil-check on c.Value: case *SchemaRef: if pathPart == "additionalProperties" { if ap := c.Value.AdditionalProperties.Has; ap != nil { // c.Value can be nil here cursor = *ap } else { cursor = c.Value.AdditionalProperties.Schema } attempted = true } When a $ref fragment drills through .../additionalProperties of a schema whose Value is still nil (a pure, not-yet-resolved $ref, or a self-reference resolved before its own Value is set), c.Value is nil and the .AdditionalProperties access panics. Input and attacker ------------------- A tiny crafted OpenAPI document, one schema, no external refs, no network: openapi: 3.0.3 info: {title: t, version: "1.0.0"} paths: {} components: schemas: A: $ref: '#/components/schemas/A/additionalProperties' Attacker model: any service or tool that loads an untrusted spec via the default openapi3.Loader (LoadFromData / LoadFromFile / LoadFromURI), e.g. a spec registry, an API-management platform ingesting user specs, a linter, or a converter. It crashes during LOAD (ResolveRefsIn), before Validate. Verification level ------------------ EXECUTED with negative controls (agent-run go test at HEAD f0407d5, including yesterday's security merge; the bug is still present). The full stack pins LoadFromD
- Products
- github.com/getkin/kin-openapi
- Affected versions
- Not specified
- Fixed versions
- 0.145.0
- CVEs
- CVE-2026-100348
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 30 Oct 2026, 19:14 UTC · Revision 1
Source evidence
kin-openapi spec loader panics on a self-referential additionalProperties $ref (nil-pointer DoS)
core-osv · Original sourcePublished 15 Oct 2026, 20:15 UTC
The defect ---------- Confirmed at HEAD (f0407d5, v0.144.0). openapi3/loader.go, inside resolveComponent's drill closure (around line 455), the case *SchemaRef branch for pathPart == "additionalProperties" dereferences c.Value.AdditionalProperties with no nil-check on c.Value: case *SchemaRef: if pathPart == "additionalProperties" { if ap := c.Value.AdditionalProperties.Has; ap != nil { // c.Value can be nil here cursor = *ap } else { cursor = c.Value.AdditionalProperties.Schema } attempted = true } When a $ref fragment drills through .../additionalProperties of a schema whose Value is still nil (a pure, not-yet-resolved $ref, or a self-reference resolved before its own Value is set), c.Value is nil and the .AdditionalProperties access panics. Input and attacker ------------------- A tiny crafted OpenAPI document, one schema, no external refs, no network: openapi: 3.0.3 info: {title: t, version: "1.0.0"} paths: {} components: schemas: A: $ref: '#/components/schemas/A/additionalProperties' Attacker model: any service or tool that loads an untrusted spec via the default openapi3.Loader (LoadFromData / LoadFromFile / LoadFromURI), e.g. a spec registry, an API-management platform ingesting user specs, a linter, or a converter. It crashes during LOAD (ResolveRefsIn), before Validate. Verification level ------------------ EXECUTED with negative controls (agent-run go test at HEAD f0407d5, including yesterday's security merge; the bug is still present). The full stack pins LoadFromD
osv:GHSA-mh7x-f8wq-4jhx
github.com/getkin/kin-openapi
Fixed versions: 0.145.0
Complete source record
{
"id": "db7520fdc95f49868d15f9133e52b9b33c0b08a8cf7105fd79f540de64fab670",
"url": "https://osv.dev/vulnerability/GHSA-mh7x-f8wq-4jhx",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "kin-openapi spec loader panics on a self-referential additionalProperties $ref (nil-pointer DoS)",
"summary": "The defect ---------- Confirmed at HEAD (f0407d5, v0.144.0). openapi3/loader.go, inside resolveComponent's drill closure (around line 455), the case *SchemaRef branch for pathPart == \"additionalProperties\" dereferences c.Value.AdditionalProperties with no nil-check on c.Value: case *SchemaRef: if pathPart == \"additionalProperties\" { if ap := c.Value.AdditionalProperties.Has; ap != nil { // c.Value can be nil here cursor = *ap } else { cursor = c.Value.AdditionalProperties.Schema } attempted = true } When a $ref fragment drills through .../additionalProperties of a schema whose Value is still nil (a pure, not-yet-resolved $ref, or a self-reference resolved before its own Value is set), c.Value is nil and the .AdditionalProperties access panics. Input and attacker ------------------- A tiny crafted OpenAPI document, one schema, no external refs, no network: openapi: 3.0.3 info: {title: t, version: \"1.0.0\"} paths: {} components: schemas: A: $ref: '#/components/schemas/A/additionalProperties' Attacker model: any service or tool that loads an untrusted spec via the default openapi3.Loader (LoadFromData / LoadFromFile / LoadFromURI), e.g. a spec registry, an API-management platform ingesting user specs, a linter, or a converter. It crashes during LOAD (ResolveRefsIn), before Validate. Verification level ------------------ EXECUTED with negative controls (agent-run go test at HEAD f0407d5, including yesterday's security merge; the bug is still present). The full stack pins LoadFromD",
"evidence": "osv:GHSA-mh7x-f8wq-4jhx",
"products": [
{
"name": {
"value": "github.com/getkin/kin-openapi",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "0.145.0",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
}
],
"severity": "medium",
"structured": {
"id": "GHSA-mh7x-f8wq-4jhx",
"aliases": [
"CVE-2026-100348",
"GHSA-mh7x-f8wq-4jhx"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
}
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"fixed": "0.145.0"
}
]
}
],
"package": {
"name": "github.com/getkin/kin-openapi",
"purl": "pkg:golang/github.com/getkin/kin-openapi",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-mh7x-f8wq-4jhx/GHSA-mh7x-f8wq-4jhx.json",
"last_known_affected_version_range": "<= 0.144.0"
}
}
],
"modified": "2026-10-15T20:30:07.050954802Z",
"provider": "osv",
"references": [
"https://github.com/getkin/kin-openapi/security/advisories/GHSA-mh7x-f8wq-4jhx",
"https://nvd.nist.gov/vuln/detail/CVE-2026-100348",
"https://github.com/getkin/kin-openapi/commit/88aa64c7cbd03ecadbb419c473bdcaa8b0124c6b",
"https://github.com/getkin/kin-openapi",
"https://github.com/getkin/kin-openapi/releases/tag/v0.145.0"
],
"provider_metadata": {
"cwe_ids": [
"CWE-476"
],
"severity": "MODERATE",
"github_reviewed": true,
"nvd_published_at": "2026-10-15T16:17:30Z",
"github_reviewed_at": "2026-10-15T20:15:58Z"
}
},
"related_cves": [
{
"value": "CVE-2026-100348",
"evidence": "/aliases"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 336052,
"published_at": "2026-10-15T20:15:58+00:00"
}