CSRF bypass in session mode via planted CSRF cookie
Description
With session authentication, micronaut-security-csrf accepts a forged state-changing request from a logged-in victim's browser without the CSRF token stored in the victim's session, as long as the request also carries a CSRF cookie whose value the attacker chose. The attacker needs a position from which to plant a cookie in the victim's browser for the application, typically a sibling subdomain they control. From there they can make any form post (or X-CSRF-TOKEN request) as the victim. In effect, the session's synchronizer token is reduced to an unsigned double-submit cookie in the default configuration.
Affected and patched versions
The following ranges cover stable releases.
| Release line | Affected versions | First patched release | Fix commit |
|---|---|---|---|
| 4.x | >= 4.11.0, < 4.18.2 | 4.18.2 | a6517ee064 |
| 5.0.x–5.4.x | >= 5.0.0, < 5.4.2 | 5.4.2 | 390f277307 |
| 5.5.x | >= 5.5.0, < 5.5.2 | 5.5.2 | b17183a616 |
The fix commits are included in the corresponding release tags and absent from the preceding stable releases (4.18.1, 5.4.1, 5.5.1).
Earliest verified affected stable source: 4.11.0. Validation accepts a match from any configured repository; the CSRF module is absent in v4.10.2.
Suggested severity
Suggested CVSS v3.1 vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/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-FWAXD5SG.