Micronaut server filters match a different path than the router and static resource resolver, allowing filter bypass
Description
Path-scoped server filters are matched against a representation of the request path that differs from the one the router or the static resource resolver uses. A trailing slash (/admin/) skips exact and single-segment-wildcard filter patterns while the route still matches; a query-only request target (?x) is served by the root route without /** or / filters; percent-encoded or %2F paths and absolute-form or //-prefixed targets make getPath(), getUri() and the decoded static-resource path disagree; and route templates and regex constraints are checked on the encoded path while handlers receive the decoded value. An unauthenticated client can reach protected controllers or static files, or pass values such as ../ past route constraints. The fix is to normalise the request path once (decode, collapse, strip the trailing slash consistently) and use that same value for filter matching, routing, static resolution and argument binding.
Affected and patched versions
The router/filter path differences predate 3.0.0. The 3.x line is affected by F27, B30UOVDU, F8T5LR27 and likely F04. F28 decoding is specific to 4.x and 5.x.
| Package | Affected versions | Patched version |
|---|---|---|
io.micronaut:micronaut-http-server-netty | < 3.10.19 | 3.10.19 |
io.micronaut:micronaut-http-server-netty | >= 4.0.0, < 4.10.37 | 4.10.37 |
io.micronaut:micronaut-http-server-netty | >= 5.0.0, < 5.2.23 | 5.2.23 |
io.micronaut:micronaut-http-server | < 3.10.19 | 3.10.19 |
io.micronaut:micronaut-http-server | >= 4.0.0, < 4.10.37 | 4.10.37 |
io.micronaut:micronaut-http-server | >= 5.0.0, < 5.2.23 | 5.2.23 |
io.micronaut:micronaut-router | < 3.10.19 | 3.10.19 |
io.micronaut:micronaut-router | >= 4.0.0, < 4.10.37 | 4.10.37 |
io.micronaut:micronaut-router | >= 5.0.0, < 5.2.23 | 5.2.23 |
io.micronaut:micronaut-core | < 3.10.19 | 3.10.19 |
io.micronaut:micronaut-core | >= 4.0.0, < 4.10.37 | 4.10.37 |
io.micronaut:micronaut-core | >= 5.0.0, < 5.2.23 | 5.2.23 |
io.micronaut:micronaut-http | < 3.10.19 | 3.10.19 |
io.micronaut:micronaut-http | >= 4.0.0, < 4.10.37 | 4.10.37 |
io.micronaut:micronaut-http | >= 5.0.0, < 5.2.23 | 5.2.23 |
The 3.x fix is in commit 0d69559a5e, first included in stable release 3.10.19. The last affected stable 3.10.x release is 3.10.18.
Findings
- F04
- F27 (= ANT-2026-MPLGPXWD)
- F28 (= ANT-2026-19DYR270)
- F55
- ANT-2026-B30UOVDU
- ANT-2026-F8T5LR27
Affected versions
- io.micronaut:micronaut-http-server-nettyfixed in 3.10.19
- io.micronaut:micronaut-http-server-nettyFrom 4.0.0 · fixed in 4.10.37
- io.micronaut:micronaut-http-server-nettyFrom 5.0.0 · fixed in 5.2.23
- io.micronaut:micronaut-http-serverfixed in 3.10.19
- io.micronaut:micronaut-http-serverFrom 4.0.0 · fixed in 4.10.37
- io.micronaut:micronaut-http-serverFrom 5.0.0 · fixed in 5.2.23
- io.micronaut:micronaut-routerfixed in 3.10.19
- io.micronaut:micronaut-routerFrom 4.0.0 · fixed in 4.10.37
- io.micronaut:micronaut-routerFrom 5.0.0 · fixed in 5.2.23
- io.micronaut:micronaut-corefixed in 3.10.19
- io.micronaut:micronaut-coreFrom 4.0.0 · fixed in 4.10.37
- io.micronaut:micronaut-coreFrom 5.0.0 · fixed in 5.2.23
- io.micronaut:micronaut-httpfixed in 3.10.19
- io.micronaut:micronaut-httpFrom 4.0.0 · fixed in 4.10.37
- io.micronaut:micronaut-httpFrom 5.0.0 · fixed in 5.2.23