Skip to main content
Menu
Advisories

CSRF bypass in session mode via planted CSRF cookie

GHSA-5JG2-867C-V33WPublished Updated GitHub

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 lineAffected versionsFirst patched releaseFix commit
4.x>= 4.11.0, < 4.18.24.18.2a6517ee064
5.0.x–5.4.x>= 5.0.0, < 5.4.25.4.2390f277307
5.5.x>= 5.5.0, < 5.5.25.5.2b17183a616

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.

Affected versions

References

GitHub · micronaut-projects/micronaut-security