Summary Several paths select a different filter chain than the one that guards the equivalent request
Description
Several paths select a different filter chain than the one that guards the equivalent request. An implicit HEAD route runs the GET handler without filters scoped to methods = GET; static resources are served for any HTTP method, bypassing filters scoped to GET/HEAD; WebSocket upgrades are dispatched without @PreMatching filters; adding an Origin header makes RouteMatchResolverHttpFilter.replaceFilters insert post-matching filters without the isEnabled reduction, so a disabled ConditionalFilter runs; and a reactive or ExecutionFlow FilterContinuation that calls proceed() twice re-enters the shared iterator past an in-flight asynchronous filter, so the route runs without that filter's decision. Depending on the application this lets a client run a handler without an authorisation filter, or run a filter the operator disabled. The fix is to build every chain through the same method/route-aware selection, include pre-matching filters on upgrades, apply the enabled reduction on replacement, and reject a second proceed().
Affected and patched versions
Implicit HEAD handling (F56) and static resources for any method (QFUWJBP7) predate 3.0.0. ConditionalFilter (F30) starts in 4.3.0, and @PreMatching (TD36CYP1) starts in 4.6.0.
| Package | Affected versions | Patched version |
|---|---|---|
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-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 |
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-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 |
The 3.x fix is in commit 5846576882, first included in stable release 3.10.19. The last affected stable 3.10.x release is 3.10.18.
Findings
- F56 (= ANT-2026-SX2SMDCJ)
- F30
- F49
- ANT-2026-QFUWJBP7
- ANT-2026-TD36CYP1
Affected versions
- 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-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
- 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-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