Skip to main content
VulnerabilityPublished 07/24/2026

Kin openapi: kin-openapi openapi3filter: unauthenticated nil-pointer panic when validating a request against a `content` parameter whose media type has no schema

Affects github.com/getkin/kin-openapiSource GCVE Database

0
CVSS 3.1 base score
5.3Medium
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 0.144.0
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

What to do

Affected software

ProductAffectedFixed in
Gogithub.com/getkin/kin-openapiAffected
  • <0.144.0
Fixed in
  • 0.144.0

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Upgrade kin-openapi to version 0.144.0 or later, where this vulnerability is fixed. If upgrading is not immediately possible, ensure that all operations declare security requirements and configure an AuthenticationFunc that rejects unauthenticated requests, preventing unauthenticated access to vulnerable request validation paths.

Description

A null-pointer dereference vulnerability exists in kin-openapi's openapi3filter.ValidateRequest function, allowing unauthenticated clients to cause a denial of service by sending a single HTTP request. The issue occurs when validating a request against a content parameter whose media type object lacks a schema, which is legal under the OpenAPI specification. This leads to a panic and potential process crash in versions up to 0.143.0. The vulnerability affects both OpenAPI 3.0.x and 3.1.x and is patched in version 0.144.0.

Impact

An unauthenticated attacker can cause a denial of service by triggering a nil-pointer panic in the request validation path, potentially crashing the server process or causing unbounded panic log growth. This can disrupt service availability. There is no impact on confidentiality or integrity. The vulnerability affects both OpenAPI 3.0.x and 3.1.x specifications as implemented by kin-openapi versions up to 0.143.0.

Summary

The kin-openapi library's openapi3filter.ValidateRequest function dereferences a nil pointer when validating requests containing a content parameter with a media type object that has no schema. Although the OpenAPI specification permits content parameters without schemas, the library's defaultContentParameterDecoder does not check for a nil schema before dereferencing it, causing a panic. This vulnerability can be triggered by unauthenticated clients if the target operation has no security requirements or if no AuthenticationFunc is configured. The issue affects versions <= 0.143.0 and is fixed in version 0.144.0.

Weaknesses

References

Community reviews

Loading reviews…

Get alerts for github.com/getkin/kin-openapi by Slack, email or webhook with Pro Console, or bring in OffSeq incident response (opens in a new tab).

Threat ID
6a6542179c2644c7f8087d15
Added
07/25/2026, 23:09:11 UTC
Analysed
07/25/2026, 23:48:40 UTC
Updated
10/03/2026, 22:07:22 UTC
Views
101