REDHAT-BUG-2553589: High severity go/github.com/getkin/kin-openapi vulnerability
kin-openapi is a Go project for handling OpenAPI files. Prior to 0.146.0, openapi3filter.ValidateResponse passes a nil response header schema to decodeValue when an OpenAPI document declares the header with content instead of schema. The document passes validation, but every response validation for the affected operation dereferences the nil schema and panics even when the response does not contain the declared header. Applications that ingest an untrusted specification can expose this as remote availability impact, while applications using only trusted local specifications still crash when the affected operation is exercised. This issue is fixed in version 0.146.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
kin-openapito a version that resolves this vulnerability.Fixed in 0.146.0
Event History
Frequently Asked Questions
Which deployments have a remote attack surface?
Applications that ingest untrusted OpenAPI specifications can be exposed to remote availability impact. The triggering specification declares a response header using content rather than schema.
Does the affected response need to include the declared header to trigger the failure?
No. Response validation can dereference the nil schema and panic even when the response does not contain the declared header.
How can I determine whether an application is affected?
Check whether it uses kin-openapi versions before 0.146.0 and performs response validation for operations whose OpenAPI documents declare response headers with content instead of schema. The issue is fixed in version 0.146.0.
Are applications using only local, trusted specifications unaffected?
No. Trusted local specifications remove the untrusted-specification remote exposure described here, but the application can still crash when an affected operation is exercised.