Skip to main content
Menu
Advisories

Micronaut caches keyed by request-controlled values grow without bound (incomplete fix of GHSA-2hcp-gjrf-7fhc)

GHSA-JJ39-PP85-XJ49Published Updated GitHub

Description

Several caches are populated from request input without a meaningful bound. The message body reader cache in AbstractMessageBodyHandlerRegistry is keyed by the request Content-Type, the CharSequence-to-SameSite converter keeps every distinct input string, the HTML error page cache bounds entries but not their size (so the GHSA-2hcp-gjrf-7fhc fix is incomplete), and long Accept-Language tags populate JDK locale caches through Micronaut's locale resolution (variant of GHSA-8hjv-92q9-g4xj). An unauthenticated client can grow the heap with each distinct header value until the server runs out of memory. The fix is to key caches only on normalised, known values (or not cache request-derived keys), bound caches by weight, and reject over-long locale tags before resolution.

Affected and patched versions

The body-handler registry cache (F25) starts in 4.0.0, the SameSite converter cache (F47) in 4.4.0, and the HTML error-page cache (KXHIU602) in 4.7.0. Locale-derived caches reached through Accept-Language (86FR77RQ, micronaut-core) also affect 3.x.

PackageAffected versionsPatched version
io.micronaut:micronaut-http>= 4.0.0, < 4.10.374.10.37
io.micronaut:micronaut-http>= 5.0.0, < 5.2.235.2.23
io.micronaut:micronaut-http-server>= 4.7.0, < 4.10.374.10.37
io.micronaut:micronaut-http-server>= 5.0.0, < 5.2.235.2.23
io.micronaut:micronaut-core< 3.10.193.10.19
io.micronaut:micronaut-core>= 4.0.0, < 4.10.374.10.37
io.micronaut:micronaut-core>= 5.0.0, < 5.2.235.2.23

The 3.x fix is in commit e5123c049e, first included in stable release 3.10.19. The last affected stable 3.10.x release is 3.10.18.

Findings

  • F25 (= ANT-2026-JV5QSOE9)
  • F47 (= ANT-2026-002EMMO8)
  • ANT-2026-KXHIU602
  • ANT-2026-86FR77RQ

Affected versions

References

GitHub · micronaut-projects/micronaut-core