REDHAT-BUG-2521204: High severity go/github.com/getkin/kin-openapi vulnerability

Published Aug 21, 2026
·
Updated

kin-openapi is a Go project for handling OpenAPI files. From 0.124.0 until 0.142.0, openapi3filter.sliceMapToSlice in openapi3filter/reqrespdecoder.go converts attacker-controlled sparse indexes from a deepObject query parameter into a dense slice by allocating entries from zero through the largest supplied index, after which buildResObj creates another slice of the same length. This allocation occurs before schema validation, so maxItems does not prevent it. An unauthenticated client can send a small query such as param[items][50000000]=x to an endpoint whose deepObject schema contains an array, forcing multi-gigabyte heap allocation and causing an OOM kill or restart loop. Other request-body encodings and styled parameters that do not produce bracketed integer indexes are not affected. This issue is fixed in version 0.142.0.

Affected Software

1 affected component
go/github.com/getkin/kin-openapi>=0.124.0<0.142.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade kin-openapi to a version that resolves this vulnerability.

    Fixed in 0.142.0

Event History

Aug 21, 2026
Data Sourced
via Red Hat·09:02 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

Which endpoints are exposed to this issue?

Endpoints are exposed when they use a deepObject query-parameter schema containing an array. The affected parsing path is triggered by bracketed integer indexes in the query parameter.

2

Does an attacker need authentication or a large request to trigger the problem?

No authentication is required. A small request with a sparse, very large array index can force large heap allocations.

3

Will a maxItems constraint prevent the allocation?

No. The allocation occurs before schema validation, so maxItems does not prevent the memory consumption.

4

Are all request parameter and body encodings affected?

No. Other request-body encodings and styled parameters that do not produce bracketed integer indexes are not affected.

5

What version resolves the issue?

The issue is fixed in version 0.142.0. Versions from 0.124.0 until 0.142.0 are affected.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203