kin-openapi deepObject query decoding repeatedly compiles an invariant regular expression
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in github.com/getkin/kin-openapi 0.146.0.
kin-openapi is a Go project for handling OpenAPI files. From 0.145.0 until 0.146.0, openapi3filter repeatedly calls regexp.MustCompile for the same parameter-name regular expression inside the per-query-key loop in urlValuesDecoder.DecodeObject used to decode a deepObject query parameter. An unauthenticated remote client can send an affected endpoint a request containing many unrelated query keys, causing ValidateRequest to perform work and allocations proportional to the attacker-controlled key count for every deepObject parameter. The expression itself is fixed and this is not regular expression denial of service; the resource consumption comes from loop-invariant recompilation. This issue is fixed in version 0.146.0.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| getkin | >=0.145.0 <0.146.0 | ||
| go: github.com/getkin/kin-openapi | >=0.145.0 <0.146.0 | 0.146.0 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in github.com/getkin/kin-openapi (Go), strongest first
Embed
A live severity badge for an advisory, README or ticket