Skip to main content

Micronaut Core CVE-2026-44242

LOW
Uncontrolled Resource Consumption (CWE-400)
2026-05-06 https://github.com/micronaut-projects/micronaut-core GHSA-3rfq-4wpf-qqw3
3.7
CVSS 3.1 · Vendor: https://github.com/micronaut-projects/micronaut-core
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Send HTTP request with unique Accept-Language
  2. Delivery
    Trigger 404 or error response
  3. Exploit
    Call DefaultHtmlErrorResponseBodyProvider.error()
  4. Install
    messageSource.getMessage() delegates to ResourceBundleMessageSource
  5. C2
    resolveBundle() extracts locale from header
  6. Execute
    Insert (locale, baseName) into unbounded bundleCache
  7. Impact
    Repeat with 100,000+ unique locales
  8. Step 8
    Heap exhaustion
  9. Step 9
    Partial DoS

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires ALL of the following: (1) The target application explicitly registers a ResourceBundleMessageSource bean via @Bean annotation or configuration (this is non-default and requires explicit user action). (2) The application serves HTML error responses for HTTP error conditions (e.g., 404, 5xx) - standard in Micronaut applications but can be disabled. (3) The attacker must send HTTP requests with Accept: text/html and unique Accept-Language header values; the attacker has complete control over the Accept-Language value. (4) The attacks must be sustained across many requests (100,000+ unique locales in PoC to reach meaningful heap consumption), not a single request. No authentication is required (PR:N). The attack is blocked if: ResourceBundleMessageSource is not explicitly registered (default configuration does not include it), HTML error responses are disabled, or the application runs with strict input validation on Accept-Language headers (unlikely). The high attack complexity (AC:H) reflects these multiple required conditions.

Impact

The CVSS vector (AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L) indicates network-accessible denial of service with high attack complexity, resulting in low availability impact. The high complexity qualifier (AC:H) suggests the attack requires multiple conditions or non-standard deployment: (1) explicit ResourceBundleMessageSource bean registration (non-default), (2) HTML error response serving, and (3) attacker control of Accept-Language headers. The attack is not instantaneous-it requires sustained, high-volume requests (PoC demonstrates 100,000 unique locales) to achieve meaningful heap exhaustion, making it a slow resource-depletion vector rather than a rapid crash. No public exploit code or active CISA KEV status is indicated, suggesting this is a logical/design vulnerability rather than a zero-day. The vulnerability is real and exploitable, but mitigation is straightforward (bounded cache), and real-world impact is constrained to applications with explicit ResourceBundleMessageSource configuration-likely a subset of Micronaut deployments. The 3.7 CVSS score appropriately reflects low-severity denial of service with significant preconditions. Missing data: No independent EPSS score provided; vendor confirms the vulnerability and patch exist (v4.10.22).

Exploit ScenarioDerived

An attacker discovers or infers that the target Micronaut application explicitly registers a ResourceBundleMessageSource bean (detectable via error message probing or source code review in open-source projects). The attacker then writes a script to send thousands of HTTP requests to non-existent paths (e.g., /nonexistent-path-1, /nonexistent-path-2, …) with unique Accept-Language headers (zz-0001, zz-0002, …, zz-100000) and Accept: text/html to trigger error page generation. Each unique locale value creates a persistent bundleCache entry (100-200 bytes for non-matching locales, more if bundles are found). Over hours or days, heap consumption grows until the JVM experiences GC pauses, slowdowns, or out-of-memory errors, degrading service availability.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 06, 2026

Memory exhaustion in Micronaut Core's ResourceBundleMessageSource allows unauthenticated remote attackers to exhaust heap memory by sending HTTP requests with crafted Accept-Language headers that populate an unbounded bundleCache. Vulnerable applications must explicitly register a ResourceBundleMessageSource bean and serve HTML error responses; each unique locale value creates a persistent cache entry (100-200 bytes for non-matching locales, or several KB if bundles match), and sustained attack over thousands of requests causes gradual heap degradation with partial availability impact (CVSS 3.7, AC:H). The sibling messageCache is properly bounded at 100 entries, but bundleCache uses an uncontrolled ConcurrentHashMap, allowing unbounded growth keyed by (Locale, baseName) pairs derived from untrusted HTTP headers.

RemediationAI

Upgrade Micronaut Core to version 4.10.22 or later. The vendor-released patch replaces the unbounded ConcurrentHashMap in buildBundleCache() with a bounded ConcurrentLinkedHashMap using maximumWeightedCapacity=50, mirroring the pattern already applied to the messageCache sibling (capacity 100). This fix fully prevents unbounded growth while accommodating realistic i18n configurations (compile-time bounded number of distinct resource bundle files). No workarounds are available for earlier versions other than disabling HTML error responses or removing the explicit ResourceBundleMessageSource bean registration, both of which have significant functional trade-offs. Deployment verification: after upgrading, confirm that io.micronaut:micronaut-inject is at 4.10.22+ by checking your build artifact manifest or dependency tree (mvn dependency:tree or gradle dependencies). See https://github.com/micronaut-projects/micronaut-core/releases/tag/v4.10.22 for detailed migration guidance.

Affected Packages

maven io.micronaut:micronaut-inject fix: 3.8.14, 3.10.6, 4.10.22

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in maven

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

ResourceBundleMessageSource is a Micronaut i18n component that caches localized resource bundles for message resolution. The vulnerability stems from the use of an unbounded ConcurrentHashMap for bundleCache in io.micronaut.context.i18n.ResourceBundleMessageSource (line 150), which stores Optional<ResourceBundle> objects keyed by MessageKey tuples containing Locale and baseName. The attack vector exploits the resolveBundle() method (line 169), which extracts Locale from the HTTP Accept-Language header and inserts it into bundleCache without size constraints. Unlike the sibling messageCache (which uses ConcurrentLinkedHashMap with maximumWeightedCapacity=100), bundleCache was initialized with only an initial capacity hint (18) and no eviction policy. CWE-400 (Uncontrolled Resource Consumption) applies because the cache growth is directly proportional to the number of unique Accept-Language values an attacker can inject. Applications using ResourceBundleMessageSource with explicit bean registration trigger DefaultHtmlErrorResponseBodyProvider.error(), which calls messageSource.getMessage(), ultimately invoking resolveBundle() for every unique locale in error responses.

Know when Java gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/micronaut-projects/micronaut-core) PRIMARY 3.7 LOW
AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L

Primary rating from Vendor (https://github.com/micronaut-projects/micronaut-core) · only source for this CVE.

CVSS VectorVendor: https://github.com/micronaut-projects/micronaut-core

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

DescriptionCVE.org

Summary

ResourceBundleMessageSource maintains two caches: messageCache (bounded at 100 entries via ConcurrentLinkedHashMap) and bundleCache (unbounded ConcurrentHashMap). The bundleCache is keyed by (Locale, baseName) where the locale originates from the HTTP Accept-Language header. In applications that explicitly register a ResourceBundleMessageSource bean and serve HTML error responses, an unauthenticated attacker can exhaust heap memory by sending requests with large numbers of unique Accept-Language values, each causing a new entry in the unbounded bundleCache. Unlike GHSA-2hcp-gjrf-7fhc and the sibling messageCache (both bounded), bundleCache was not updated to use a bounded cache implementation.

Details

The bundleCache is initialized in inject/src/main/java/io/micronaut/context/i18n/ResourceBundleMessageSource.java at line 150:

java
// ResourceBundleMessageSource.java:139-152
protected Map<MessageKey, Optional<String>> buildMessageCache() {
    return new ConcurrentLinkedHashMap.Builder<MessageKey, Optional<String>>()
            .maximumWeightedCapacity(100)    // ← BOUNDED ✓
            .build();
}

protected Map<MessageKey, Optional<ResourceBundle>> buildBundleCache() {
    return new ConcurrentHashMap<>(18);      // ← UNBOUNDED ✗
}

The resolveBundle() method at line 169 inserts into bundleCache with no eviction policy:

java
// ResourceBundleMessageSource.java:169-185
private Optional<ResourceBundle> resolveBundle(Locale locale) {
    MessageKey key = new MessageKey(locale, baseName);
    final Optional<ResourceBundle> resourceBundle = bundleCache.get(key);
    if (resourceBundle != null) {
        return resourceBundle;
    } else {
        Optional<ResourceBundle> opt;
        try {
            opt = Optional.of(ResourceBundle.getBundle(baseName, locale, getClassLoader()));
        } catch (MissingResourceException e) {
            opt = Optional.empty();
        }
        bundleCache.put(key, opt);    // NO SIZE CHECK - unbounded growth
        return opt;
    }
}

The attack path requires:

  1. The application registers a ResourceBundleMessageSource bean (non-default, requires explicit user configuration).
  2. The attacker sends requests that trigger HTML error responses - i.e., requests with Accept: text/html to any URL that returns an error (e.g., 404 for any non-existent path).
  3. Each request uses a unique Accept-Language value (e.g., zz-AA, zz-AB, …).
  4. DefaultHtmlErrorResponseBodyProvider.error() calls messageSource.getMessage(code, locale) → CompositeMessageSource delegates to ResourceBundleMessageSource → resolveBundle(locale) inserts one entry per unique locale into bundleCache.

For locales that don't match any bundle file, ResourceBundle.getBundle() throws MissingResourceException and Optional.empty() is stored - a low-cost sentinel. For locales that DO match a bundle, a full ResourceBundle object is retained in memory. In either case, the map itself and the MessageKey objects grow without bound.

Note: the messageCache is bounded at 100 entries but does not prevent bundleCache growth, as resolveBundle() is called directly (bypassing messageCache) whenever a messageCache miss occurs.

PoC

Against a Micronaut application with a ResourceBundleMessageSource bean registered (e.g., @Bean ResourceBundleMessageSource messages() { return new ResourceBundleMessageSource("messages"); }):

bash
# Flood bundleCache with unique locales via HTML error path
for i in $(seq 1 100000); do
  curl -s -o /dev/null \
    -H "Accept: text/html" \
    -H "Accept-Language: zz-$(printf '%04d' $i)" \
    "http://localhost:8080/nonexistent-path-$(printf '%06d' $i)" &
  [ $((i % 200)) -eq 0 ] && wait
done
wait

Each unique zz-XXXX tag creates one new bundleCache entry. The MessageKey (Locale + baseName) and map overhead cost approximately 100-200 bytes per entry. At 100,000 entries, heap consumption from the cache alone reaches roughly 20 MB - significant in resource-constrained deployments. If a locale matches a bundle file, retained ResourceBundle objects cost substantially more per entry.

Impact

  • Only affects applications that explicitly register a ResourceBundleMessageSource bean (not the default configuration).
  • Requires the ability to send HTTP requests with Accept: text/html headers and control over the Accept-Language value.
  • Memory grows approximately 100-200 bytes per novel locale (for non-matching locales) up to several KB per locale if bundles are found. Sustained attack over time causes gradual heap exhaustion.
  • Partial availability impact (A:L) under sustained attack in long-running services.

Recommended Fix

Apply the same bounded-cache pattern used for the sibling messageCache:

java
// In ResourceBundleMessageSource.java - replace buildBundleCache()
protected Map<MessageKey, Optional<ResourceBundle>> buildBundleCache() {
    return new ConcurrentLinkedHashMap.Builder<MessageKey, Optional<ResourceBundle>>()
            .maximumWeightedCapacity(50)    // small - one entry per (locale, baseName)
            .build();
}

The number of distinct resource bundle files is bounded at compile time; a limit of 50 entries is more than sufficient for any realistic i18n configuration while fully preventing unbounded growth.

Threat Intelligence Overview

EPSS Score
0.0%
Top 89% exploitable
Threat Intel
1
1 source
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Low

Priority Score

18
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +18
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Affected Products (CPE)CVE.org

pkg:maven/io.micronaut:micronaut-inject

More in Java

View all
CVE-2012-4681 CRITICAL POC
9.8 Aug 28

Oracle Java SE 7 Update 6 and earlier contains multiple sandbox bypass vulnerabilities via the ClassFinder and forName m

CVE-2015-7450 CRITICAL POC
9.8 Jan 02

Remote code execution in IBM Sterling B2B Integrator, Sterling Integrator, and Tivoli Common Reporting allows unauthenti

CVE-2013-2465 CRITICAL POC
9.8 Jun 18

Java Runtime Environment sandbox bypass via incorrect image channel verification in 2D component allows remote unauthent

CVE-2011-3544 CRITICAL POC
9.8 Oct 19

Oracle Java SE JDK/JRE 7 and 6 Update 27 and earlier allows remote code execution with complete system compromise throug

CVE-2010-1871 HIGH POC
8.8 Aug 05

JBoss Seam 2 in Red Hat JBoss EAP 4.3.0 fails to sanitize JBoss Expression Language inputs, allowing remote attackers to

CVE-2012-1723 CRITICAL POC
9.8 Jun 16

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 update 4 and earlier, 6 up

CVE-2013-0422 CRITICAL POC
9.8 Jan 10

Multiple vulnerabilities in Oracle Java 7 before Update 11 allow remote attackers to execute arbitrary code by (1) using

CVE-2012-0507 CRITICAL POC
9.8 Jun 07

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 2 and earlier, 6 Up

CVE-2015-4852 CRITICAL POC
9.8 Nov 18

The WLS Security component in Oracle WebLogic Server 10.3.6.0, 12.1.2.0, 12.1.3.0, and 12.2.1.0 allows remote attackers

CVE-2012-5076 CRITICAL POC
9.8 Oct 16

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 7 and earlier allow

CVE-2017-3066 CRITICAL POC
9.8 Apr 27

Remote unauthenticated attackers can execute arbitrary code on Adobe ColdFusion servers through Java deserialization fla

CVE-2012-0391 CRITICAL POC
9.8 Jan 08

The ExceptionDelegator component in Apache Struts before 2.2.3.1 interprets parameter values as OGNL expressions during

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy