Skip to main content
Menu
Advisories

CsrfFilter returns 500 on malformed form body, allowing log injection

GHSA-JQMR-RMH4-7VWQPublished Updated GitHub

Description

With micronaut-security-csrf at its defaults, an unauthenticated client can write lines of its choosing into the application log at ERROR level, simply by POSTing a form body that contains an invalid percent escape such as %zz to /login or any other anonymous route. Instead of the usual 401/403, the server answers 500 and logs the raw request body, line feeds included, along with a stack trace. The controller is never reached, so CSRF protection still holds and nothing is disclosed to the sender.

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.2cc18b22202
5.0.x–5.4.x>= 5.0.0, < 5.4.25.4.2a13cd8600d
5.5.x>= 5.5.0, < 5.5.25.5.2e0ac4aa452

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. Token resolvers are invoked without handling malformed-body failures; the CSRF module is absent in v4.10.2.

Suggested severity

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

Affected versions

References

GitHub · micronaut-projects/micronaut-security