Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐹 Go
Not in CISA KEV

kin-openapi openapi3filter: nil-pointer panic in ValidateResponse on a response header declared with contentGHSA-74vm-87hj-r66f

Fix: getkin/kin-openapi@f5441d6

GHSA-74vm-87hj-r66f is a NULL Pointer Dereference vulnerability in github.com/getkin/kin-openapi. A fix is available for github.com/getkin/kin-openapi — see the affected versions and patch details below.

Also known asCVE-2026-100349
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 24, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for GHSA-74vm-87hj-r66f.

EPSS Exploitation Probability

via FIRST.org ↗
0.4%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs30th percentile — riskier than 30% of all scored CVEsHighest risk

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

Real-World Exposure

1 pkg affected
🐹github.com/getkin/kin-openapi

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

Description

Summary

ValidateResponse panics on a nil pointer when a spec declares a response header with content instead of schema. doc.Validate() accepts that document, so the crash comes from a spec the library just called valid.

Same class as GHSA-jpcw-4wr7-c3vq, which covered the request-parameter case in v0.144.0; this is the response-header path.

Affects github.com/getkin/kin-openapi <= v0.145.0. Reproduced on master 947498e5a6bd, Go 1.26.

Details

A content-typed response header has headerRef.Value.Schema == nil.

validate_response.go:181 passes it straight through:

if decodedValue, found, err = decodeValue(dec, headerName, sm, headerRef.Value.Schema, headerRef.Value.Required); err != nil {

and req_resp_decoder.go:273 is where it lands:

if len(schema.Value.AllOf) > 0 {

Two things I checked rather than assumed. The response does not need to carry the header; declaring it is enough, and then every call for that operation panics. And the body path is fine, :114 returns early on a nil schema, so this is headers only. The PoC keeps the body case as a control.

PoC

Drop into openapi3filter/ and run:

go test ./openapi3filter/ -run NilSchema -v
package openapi3filter_test

import (
	"context"
	"io"
	"net/http"
	"net/http/httptest"
	"strings"
	"testing"

	"github.com/getkin/kin-openapi/openapi3"
	"github.com/getkin/kin-openapi/openapi3filter"
	"github.com/getkin/kin-openapi/routers"
)

const specBody = `
openapi: 3.0.3
info: {title: poc, version: "1.0.0"}
paths:
  /x:
    get:
      responses:
        "200":
          description: ok
          content:
            application/json: {}
`

const specHeader = `
openapi: 3.0.3
info: {title: poc, version: "1.0.0"}
paths:
  /x:
    get:
      responses:
        "200":
          description: ok
          headers:
            X-Thing:
              content:
                application/json: {}
`

func validatedInput(t *testing.T, spec string, hdr http.Header) *openapi3filter.ResponseValidationInput {
	t.Helper()
	doc, err := openapi3.NewLoader().LoadFromData([]byte(spec))
	if err != nil {
		t.Fatalf("load: %v", err)
	}
	if err := doc.Validate(context.Background()); err != nil {
		t.Fatalf("doc.Validate rejected the spec, so this repro proves nothing: %v", err)
	}
	op := doc.Paths.Find("/x").Get
	req := httptest.NewRequest(http.MethodGet, "/x", nil)
	return &openapi3filter.ResponseValidationInput{
		RequestValidationInput: &openapi3filter.RequestValidationInput{
			Request: req,
			Route:   &routers.Route{Spec: doc, Operation: op, Method: http.MethodGet, Path: "/x"},
		},
		Status: 200,
		Header: hdr,
		Body:   io.NopCloser(strings.NewReader(`{}`)),
	}
}

// Control: body path returns early on a nil schema.
func TestControl_ResponseBodyNilSchema(t *testing.T) {
	in := validatedInput(t, specBody, http.Header{"Content-Type": {"application/json"}})
	defer func() {
		if r := recover(); r != nil {
			t.Errorf("body path panicked, expected clean return: %v", r)
		}
	}()
	if err := openapi3filter.ValidateResponse(context.Background(), in); err != nil {
		t.Errorf("body path returned %v, expected nil", err)
	}
}

// The response does not carry X-Thing. Declaring the header is enough.
func TestResponseHeaderNilSchema(t *testing.T) {
	in := validatedInput(t, specHeader, http.Header{"Content-Type": {"application/json"}})
	if err := openapi3filter.ValidateResponse(context.Background(), in); err != nil {
		t.Fatalf("no panic; got err = %v (already fixed?)", err)
	}
}

Output:

=== RUN   TestControl_ResponseBodyNilSchema
--- PASS: TestControl_ResponseBodyNilSchema (0.00s)
=== RUN   TestResponseHeaderNilSchema
--- FAIL: TestResponseHeaderNilSchema (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered, repanicked]
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x7f6d2a]

github.com/getkin/kin-openapi/openapi3filter.decodeValue(...)
	/src/openapi3filter/req_resp_decoder.go:273 +0x4a
github.com/getkin/kin-openapi/openapi3filter.validateResponseHeader(...)
	/src/openapi3filter/validate_response.go:181 +0x146
github.com/getkin/kin-openapi/openapi3filter.ValidateResponse(...)
	/src/openapi3filter/validate_response.go:89 +0xafa

The FAIL is the point: control passes, the header case takes the binary down.

Ran in a container against a fresh clone of master. I have not tried it against a live proxy.

Impact

A process crash instead of an error return. Declaring the header is enough, so it is every call on that operation rather than an occasional one.

If the spec comes from somewhere else -- gateways, linters, anything ingesting specs it did not write -- that is a trust boundary, and it becomes remote availability.

If it is your own spec, nothing attacker-controlled starts it, but any client reaching that route then crashes the process. It fires on every call, so normally you would see it the first time that route runs. A spec edited without exercising the route is the case where you would not. That is the difference from GHSA-jpcw, where the attacker supplied the trigger. I have left severity unset; the two cases do not score the same.

On how common it is, I checked rather than guessed. Of roughly 1,500 OpenAPI 3.x specs on apis.guru, one declares content-typed response headers -- VTEX Catalog API -- and not in one corner of it: the shape repeats across its operations, so for that consumer this is not an edge case.

The header names in it (X-AspNet-Version, p3p, a few malformed ones) look like a generator emitting content where it could not infer a schema, and apis.guru only indexes public specs. There is no content-typed response header in this repo's testdata either.

Workarounds

Use schema on the response header, or skip ValidateResponse for those operations. ExcludeResponseBody will not do it -- headers are validated before that check.

Suggested fix

Nil-guard at the top of decodeValue:

if schema == nil {
	return nil, false, nil
}

Returning nil leaves a content-typed header unvalidated rather than erroring, so it trades the crash for a silent gap. An error return kills the panic just as well if you would rather it surfaced.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/getkin/kin-openapiall versions0.146.0go get github.com/getkin/kin-openapi@v0.146.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/getkin/kin-openapi, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update github.com/getkin/kin-openapi to 0.146.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-74vm-87hj-r66f is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatImportant
ProductFixed inAdvisory
Red Hat Hardened Imagesgrafana12-4-main-12.4.12-0.4.hum1RHSA-2026:76677
Red Hat Hardened Imageshugo-main-0.168.0-0.1.hum1RHSA-2026:82637
Red Hat Hardened Imagesgrafana13-2-main-13.2.3-0.3.hum1RHSA-2026:85266
Red Hat Hardened Imagesgrafana13-1-main-13.1.8-0.3.hum1RHSA-2026:87077

Frequently Asked Questions

## Summary `ValidateResponse` panics on a nil pointer when a spec declares a response header with `content` instead of `schema`. `doc.Validate()` accepts that document, so the crash comes from a spec the library just called valid. Same class as GHSA-jpcw-4wr7-c3vq, which covered the request-parameter case in v0.144.0; this is the response-header path. Affects `github.com/getkin/kin-openapi` `<= v0.145.0`. Reproduced on master `947498e5a6bd`, Go 1.26. ## Details A `content`-typed response header has `headerRef.Value.Schema == nil`. `validate_response.go:181` passes it straight through: `
O3 Security · Impact-Aware SCA

Is GHSA-74vm-87hj-r66f in your dependencies?

Find it across Go, including transitive dependencies.

kin-openapi openapi3filter: nil-pointer panic in…