CVE-2026-44242: Micronaut inject Remote Code Execution Vulnerability
LOWCVE-2026-44242 is a LOW (CVSS 3.7) remote code execution vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Micronaut inject libraries in the Maven ecosystem. The issue involves micronaut has unbounded `bundlecache` in `resourcebundlemessagesource` that allows memory exhaustion via `accept-language` header. Remediation is available by upgrading affected packages to version 4.10.22, 3.10.6, 3.8.14.
CVE-2026-44242 at a Glance
Security Impact
CVSS: 3.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L).
How to Fix CVE-2026-44242
To remediate this vulnerability, upgrade all affected Micronaut inject dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>io.micronaut</groupId>
<artifactId>micronaut-inject</artifactId>
<version>4.10.22</version>
</dependency>
<dependency>
<groupId>io.micronaut</groupId>
<artifactId>micronaut-inject</artifactId>
<version>3.10.6</version>
</dependency>
<dependency>
<groupId>io.micronaut</groupId>
<artifactId>micronaut-inject</artifactId>
<version>3.8.14</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=io.micronaut
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2026-44242, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=io.micronaut
Analyze the terminal output to locate any version of Micronaut inject in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.10.22), your application is affected.
Note: The mvn dependency:tree -Dincludes=io.micronaut command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Micronaut inject, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-44242 Affected Micronaut inject Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
io.micronaut:micronaut-inject
|
Maven |
≥ 4.10.0
< 4.10.22
|
4.10.22
|
|
io.micronaut:micronaut-inject
|
Maven |
≥ 3.10.0
< 3.10.6
|
3.10.6
|
|
io.micronaut:micronaut-inject
|
Maven |
< 3.8.14
|
3.8.14
|
References
Frequently Asked Questions
What is CVE-2026-44242?
Which Micronaut inject versions are affected?
What version fixes CVE-2026-44242?
Is micronaut-inject affected?
What is the CVSS score of CVE-2026-44242?
What CWE is associated with CVE-2026-44242?
How can I check Maven dependencies for CVE-2026-44242?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3rfq-4wpf-qqw3",
"modified" : "2026-06-30T19:52:47Z",
"published" : "2026-05-06T19:57:54Z",
"aliases" : [ "CVE-2026-44242" ],
"summary" : "Micronaut has Unbounded `bundleCache` in `ResourceBundleMessageSource` that Allows Memory Exhaustion via `Accept-Language` Header",
"details" : "## Summary\n\n`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.\n\n## Details\n\nThe `bundleCache` is initialized in `inject/src/main/java/io/micronaut/context/i18n/ResourceBundleMessageSource.java` at line 150:\n\n```java\n// ResourceBundleMessageSource.java:139-152\nprotected Map<MessageKey, Optional<String>> buildMessageCache() {\n return new ConcurrentLinkedHashMap.Builder<MessageKey, Optional<String>>()\n .maximumWeightedCapacity(100) // ← BOUNDED ✓\n .build();\n}\n\nprotected Map<MessageKey, Optional<ResourceBundle>> buildBundleCache() {\n return new ConcurrentHashMap<>(18); // ← UNBOUNDED ✗\n}\n```\n\nThe `resolveBundle()` method at line 169 inserts into `bundleCache` with no eviction policy:\n\n```java\n// ResourceBundleMessageSource.java:169-185\nprivate Optional<ResourceBundle> resolveBundle(Locale locale) {\n MessageKey key = new MessageKey(locale, baseName);\n final Optional<ResourceBundle> resourceBundle = bundleCache.get(key);\n if (resourceBundle != null) {\n return resourceBundle;\n } else {\n Optional<ResourceBundle> opt;\n try {\n opt = Optional.of(ResourceBundle.getBundle(baseName, locale, getClassLoader()));\n } catch (MissingResourceException e) {\n opt = Optional.empty();\n }\n bundleCache.put(key, opt); // NO SIZE CHECK — unbounded growth\n return opt;\n }\n}\n```\n\nThe attack path requires:\n1. The application registers a `ResourceBundleMessageSource` bean (non-default, requires explicit user configuration).\n2. 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).\n3. Each request uses a unique `Accept-Language` value (e.g., `zz-AA`, `zz-AB`, …).\n4. `DefaultHtmlErrorResponseBodyProvider.error()` calls `messageSource.getMessage(code, locale)` → `CompositeMessageSource` delegates to `ResourceBundleMessageSource` → `resolveBundle(locale)` inserts one entry per unique locale into `bundleCache`.\n\nFor 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.\n\nNote: 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.\n\n## PoC\n\nAgainst a Micronaut application with a `ResourceBundleMessageSource` bean registered (e.g., `@Bean ResourceBundleMessageSource messages() { return new ResourceBundleMessageSource(\"messages\"); }`):\n\n```bash\n# Flood bundleCache with unique locales via HTML error path\nfor i in $(seq 1 100000); do\n curl -s -o /dev/null \\\n -H \"Accept: text/html\" \\\n -H \"Accept-Language: zz-$(printf '%04d' $i)\" \\\n \"http://localhost:8080/nonexistent-path-$(printf '%06d' $i)\" &\n [ $((i % 200)) -eq 0 ] && wait\ndone\nwait\n```\n\nEach 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.\n\n## Impact\n\n- Only affects applications that explicitly register a `ResourceBundleMessageSource` bean (not the default configuration).\n- Requires the ability to send HTTP requests with `Accept: text/html` headers and control over the `Accept-Language` value.\n- 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.\n- Partial availability impact (A:L) under sustained attack in long-running services.\n\n## Recommended Fix\n\nApply the same bounded-cache pattern used for the sibling `messageCache`:\n\n```java\n// In ResourceBundleMessageSource.java — replace buildBundleCache()\nprotected Map<MessageKey, Optional<ResourceBundle>> buildBundleCache() {\n return new ConcurrentLinkedHashMap.Builder<MessageKey, Optional<ResourceBundle>>()\n .maximumWeightedCapacity(50) // small — one entry per (locale, baseName)\n .build();\n}\n```\n\nThe 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "io.micronaut:micronaut-inject"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.10.0"
}, {
"fixed" : "4.10.22"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "io.micronaut:micronaut-inject"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.10.0"
}, {
"fixed" : "3.10.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "io.micronaut:micronaut-inject"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.8.14"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/micronaut-projects/micronaut-core/security/advisories/GHSA-3rfq-4wpf-qqw3"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-44242"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/micronaut-projects/micronaut-core"
}, {
"type" : "WEB",
"url" : "https://github.com/micronaut-projects/micronaut-core/releases/tag/v3.10.6"
}, {
"type" : "WEB",
"url" : "https://github.com/micronaut-projects/micronaut-core/releases/tag/v3.8.14"
}, {
"type" : "WEB",
"url" : "https://github.com/micronaut-projects/micronaut-core/releases/tag/v4.10.22"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-06T19:57:54Z",
"nvd_published_at" : "2026-05-12T22:16:35Z"
}
}