Access tokens logged at DEBUG via AccessTokenGeneratedEvent toString
Description
When Micronaut core's event publisher logger is at DEBUG, micronaut-security writes the full signed access token of every login and refresh to the application log. It also writes the token of every authenticated request. Anyone who can read that log can replay those tokens as the corresponding users until they expire, which is 3600 s by default. The precondition is an operator choice: the root logger, io.micronaut, or io.micronaut.context.event.ApplicationEventPublisher must be at DEBUG. DEBUG on io.micronaut.security alone does not leak, nothing is logged at INFO, and a remote client cannot trigger or read this without access to the log. The attached reproducer starts a minimal...
Affected and patched versions
The following ranges cover stable releases.
| Release line | Affected versions | First patched release | Fix commit |
|---|---|---|---|
| 3.11.x and earlier | >= 1.1.1, < 3.11.3 | 3.11.3 | 68713492ab |
| 4.x | >= 4.0.0, < 4.18.2 | 4.18.2 | 6f4fe0ea70 |
| 5.0.x–5.4.x | >= 5.0.0, < 5.4.2 | 5.4.2 | 094a3e3907 |
| 5.5.x | >= 5.5.0, < 5.5.2 | 5.5.2 | 5df48cab00 |
The fix commits are included in the corresponding release tags and absent from the preceding stable releases (3.11.2, 4.18.1, 5.4.1, 5.5.1).
Earliest verified affected stable source: 1.1.1. The event passes the token to ApplicationEvent as its source, with no redacting toString override.
Version 1.1.1 is the earliest stable source tag available in this repository. Releases before that tag have not been verified.
Suggested severity
Suggested CVSS v3.1 vector: CVSS:3.1/AV:L/AC:L/PR:L/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-7I7PEJV0.