# GHSA-JQMR-RMH4-7VWQ: CsrfFilter returns 500 on malformed form body, allowing log injection

- Database: GitHub
- Severity: CVSS 5.3 (Medium)
- Published: 2026-11-11
- Modified: 2026-11-11

## Affected versions

- io.micronaut.security:micronaut-security-csrf (Maven): from 4.11.0, fixed in 4.18.2
- io.micronaut.security:micronaut-security-csrf (Maven): from 5.0.0, fixed in 5.4.2
- io.micronaut.security:micronaut-security-csrf (Maven): from 5.5.0, fixed in 5.5.2

## Description

## Summary
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 line | Affected versions | First patched release | Fix commit |
| --- | --- | --- | --- |
| 4.x | `>= 4.11.0, < 4.18.2` | `4.18.2` | [cc18b22202](https://github.com/micronaut-projects/micronaut-security/commit/cc18b222028ceb4886d202a3018ab89c7802d495) |
| 5.0.x–5.4.x | `>= 5.0.0, < 5.4.2` | `5.4.2` | [a13cd8600d](https://github.com/micronaut-projects/micronaut-security/commit/a13cd8600d4b6e7968dca7ff3feef9babbd14f17) |
| 5.5.x | `>= 5.5.0, < 5.5.2` | `5.5.2` | [e0ac4aa452](https://github.com/micronaut-projects/micronaut-security/commit/e0ac4aa4524f00bf066210009293ba9e1c82866c) |

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](https://github.com/micronaut-projects/micronaut-security/blob/v4.11.0/security-csrf/src/main/java/io/micronaut/security/csrf/filter/CsrfFilter.java). 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`.

## References

- https://github.com/micronaut-projects/micronaut-security/security/advisories/GHSA-jqmr-rmh4-7vwq

Page: https://cve.now/GHSA-JQMR-RMH4-7VWQ

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
