# GHSA-GJ4V-R6X3-66JP: Micronaut server filters scoped by the context path do not run on function, WebSocket and prefix-colliding routes

- Database: GitHub
- Severity: CVSS 4.8 (Medium)
- Published: 2026-11-11
- Modified: 2026-11-11

## Affected versions

- io.micronaut:micronaut-http-server-netty (Maven): fixed in 3.10.19
- io.micronaut:micronaut-http-server-netty (Maven): from 4.0.0, fixed in 4.10.37
- io.micronaut:micronaut-http-server-netty (Maven): from 5.0.0, fixed in 5.2.23
- io.micronaut:micronaut-router (Maven): fixed in 3.10.19
- io.micronaut:micronaut-router (Maven): from 4.0.0, fixed in 4.10.37
- io.micronaut:micronaut-router (Maven): from 5.0.0, fixed in 5.2.23
- io.micronaut:micronaut-function-web (Maven): fixed in 3.10.19
- io.micronaut:micronaut-function-web (Maven): from 4.0.0, fixed in 4.10.37
- io.micronaut:micronaut-function-web (Maven): from 5.0.0, fixed in 5.2.23
- io.micronaut:micronaut-core (Maven): fixed in 3.10.19
- io.micronaut:micronaut-core (Maven): from 4.0.0, fixed in 4.10.37
- io.micronaut:micronaut-core (Maven): from 5.0.0, fixed in 5.2.23

## Description

### Summary

When `micronaut.server.context-path` is set, server filter patterns are prefixed with the context path, but several route kinds are not mounted under it consistently. `@FunctionBean` routes and `@ServerWebSocket` upgrades are served outside the context path, so a context-path-scoped filter (including a global `/**` authentication filter) never runs for them. REGEX filter patterns are joined to the context path with a URI path joiner, so anchored or alternated expressions silently stop matching, and filter or static-resource patterns that merely begin with the context-path string are not prefixed while the routes they guard are. An unauthenticated client can reach endpoints that the application believes are protected by a filter. The fix is to compute the effective mount path of every route kind and filter pattern in one place and to prefix REGEX patterns as patterns, not as paths.

### Affected and patched versions

Function and WebSocket route registration and context-path filter prefixing predate 3.0.0. F22 requires the REGEX pattern style, available in 3.x and later.

| 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-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-function-web` | `< 3.10.19` | `3.10.19` |
| `io.micronaut:micronaut-function-web` | `>= 4.0.0, < 4.10.37` | `4.10.37` |
| `io.micronaut:micronaut-function-web` | `>= 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` |

The 3.x fix is in [commit cca22779fb](https://github.com/micronaut-projects/micronaut-core/commit/cca22779fb0009e39db68763a60bb61c56cedf29), first included in stable release [3.10.19](https://github.com/micronaut-projects/micronaut-core/releases/tag/v3.10.19). The last affected stable 3.10.x release is 3.10.18.

### Findings

- F01 (= ANT-2026-M3ERVTCE)
- F21
- F22 (= ANT-2026-LX2W055I)
- F26 (= ANT-2026-RNE5JPDX)

## References

- https://github.com/micronaut-projects/micronaut-core/security/advisories/GHSA-gj4v-r6x3-66jp

Page: https://cve.now/GHSA-GJ4V-R6X3-66JP

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
