Skip to main content
Menu
Advisories

Auth bypass: @Secured expressions evaluated as another user during JWKS load

GHSA-23V7-VRJC-9M3PPublished Updated GitHub

Description

An unauthenticated client with no key and no account can get the response of a controller method protected by a @Secured expression on user. This happens whenever the client's request is checked while another user's request is loading the remote JWK Set: the expression is evaluated as that other user. An authenticated user for whom the expression is false is let through the same way. It requires two documented opt-ins, JWT validation against a remote JWK Set (…signatures.jwks.*.url, or an OpenID client's jwks_uri) and an expression-based @Secured. The attached reproducer sends a junk bearer token (header {"alg":"RS256"}, payload {"sub":"nobody"}, 256 bytes of 0x01 as the signature). That...

Affected and patched versions

The following ranges cover stable releases.

Release lineAffected versionsFirst patched releaseFix commit
4.x>= 4.11.0, < 4.18.24.18.2454b008ca0
5.0.x–5.4.x>= 5.0.0, < 5.4.35.4.3ef855edbbd
5.5.x>= 5.5.0, < 5.5.35.5.38e903396c8

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

The lower bound is the earliest stable release the finding traces the behavior to.

Suggested severity

Suggested CVSS v3.1 vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/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-MRC8GGCN.

Affected versions

References

GitHub · micronaut-projects/micronaut-security