CVE-2026-77354

kin-openapi: Uncontrolled resource consumption in openapi3filter deepObject query parameter decoding

Published Aug 21, 2026 CVSS 4.0 · 8.7 High EPSS < 1% KEV · Not listed
Description
kin-openapi is a Go project for handling OpenAPI files. From 0.124.0 until 0.142.0, openapi3filter.sliceMapToSlice in openapi3filter/req_resp_decoder.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.

Analysis

AI-generated

Technical impact

The vulnerability is an uncontrolled allocation of slice memory in the openapi3filter library when decoding deepObject style query parameters. An attacker can supply a sparse index list such as param[items][50000000]=x, causing the decoder to allocate a dense slice of that length before schema validation. This forces the process to reserve several gigabytes of heap space, which can trigger an OOM kill or restart loop. The CVSS score of 8.7 classifies it as high impact, indicating a risk to availability and potential denial‑of‑service. The weakness is listed as CWE‑1285, CWE‑400, and CWE‑789, underscoring the lack of input size validation and memory consumption issues.

Affected Systems

The affected product is getkin:kin-openapi, a Go library for handling OpenAPI files. Versions from 0.124.0 up to but not including 0.142.0 are vulnerable. The issue is fixed in version 0.142.0 and later, so any deployment using these ranges is at risk.

Risk and Exploitability

The CVSS score of 8.7 indicates a high impact, while the EPSS score of 0.00302 (~0.3%) shows a very low current exploitation probability. The vulnerability is not listed in the CISA KEV catalog. The likely attack vector is an unauthenticated network client sending a crafted query to any endpoint that accepts deepObject parameters. Successful exploitation can exhaust system memory, leading to application termination or repeated restarts, and thereby causing a denial‑of‑service condition. No authentication or privileged prerequisites are required beyond the ability to access the endpoint.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the official patch by upgrading kin-openapi to version 0.142.0 or later, where the slice allocation has been corrected.
  • If an upgrade is not immediately possible, limit the maximum allowed index value for deepObject query parameters or disable deepObject styling on sensitive endpoints to prevent large sparse indices.
  • Configure application or container resource limits to cap memory usage, such as setting a heap size limit or using cgroups to prevent the process from consuming all available RAM.
  • Implement rate limiting or input validation for query parameters to reject unusually large or sparse index lists before decoding occurs.

Generated by OpenCVE AI on September 10, 2026 at 05:16 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-xhj3-7xw9-vr34 kin-openapi has uncontrolled resource consumption in openapi3filter deepObject query parameter decoding
History
Type Values Removed Values Added
Weaknesses CWE-1285
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Important

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Getkin
Getkin kin-openapi
Vendors & Products Getkin
Getkin kin-openapi
Type Values Removed Values Added
Description kin-openapi is a Go project for handling OpenAPI files. From 0.124.0 until 0.142.0, openapi3filter.sliceMapToSlice in openapi3filter/req_resp_decoder.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.
Title kin-openapi: Uncontrolled resource consumption in openapi3filter deepObject query parameter decoding
Weaknesses CWE-400
CWE-789
References
Metrics cvssV4_0

{'score': 8.7, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-1285

    Improper Validation of Specified Index, Position, or Offset in Input

  • CWE-400

    Uncontrolled Resource Consumption

  • CWE-789

    Memory Allocation with Excessive Size Value

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 25, 2026, 7:15 PM
Reserved
Aug 20, 2026, 7:28 PM
Status
Deferred
Published
Aug 21, 2026, 9:17 PM
Modified
Oct 12, 2026, 4:10 PM
Severity
Important
Public date
Aug 21, 2026, 8:44 PM