Skip to main content
Menu
Advisories

Intercept URL map root pattern bypassed when a context path is set

GHSA-9P96-XFM5-FHRRPublished Updated GitHub

Description

When micronaut.server.context-path is set, an intercept URL map entry for / (or /*) stops matching anything. A client without credentials, or without the required role, can then get the application's root route with a plain GET /ctx or GET /ctx/. The preconditions are all ordinary configuration: a context path is set, the root controller relies on the intercept URL map rather than @Secured, and a later, broader entry grants weaker access (for example /** → isAnonymous()). Exactly one route is exposed, the context root, for any HTTP method. The attached reproducer runs the same map with and without context-path: /portal. Anonymous GET / returns 401 at the server root and /portal/invoices...

Affected and patched versions

The following ranges cover stable releases.

Release lineAffected versionsFirst patched releaseFix commit
3.11.x and earlier>= 3.7.2, < 3.11.33.11.3d80b3952f6
4.x>= 4.0.0, < 4.18.24.18.2f82cfa2ef0
5.0.x–5.4.x>= 5.0.0, < 5.4.25.4.21df3d691ba
5.5.x>= 5.5.0, < 5.5.25.5.2b0fbfd1614

The fix commits are included in the corresponding release tags and absent from the preceding stable releases (3.11.2, 4.18.1, 5.4.1, 5.5.1).

Earliest verified affected stable source: 3.7.2. v3.7.2 introduces context-path prepending of intercept URL patterns; the option is absent in v3.7.1.

Suggested severity

Suggested CVSS v3.1 vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N. This is an initial estimate based on the finding report and should be reviewed against the final impact and deployment prerequisites.

Source finding: ANT-2026-B3PSVAUU.

Affected versions

References

GitHub · micronaut-projects/micronaut-security