{"id":"CVE-2022-21700","published":"2022-01-18T22:15:13Z","modified":"2025-04-23T19:10:23Z","title":"Memory leak in micronaut-core","vendor":"micronaut-projects","product":"micronaut-core","tier":"tail","description":{"text":"Micronaut is a JVM-based, full stack Java framework designed for building JVM web applications with support for Java, Kotlin and the Groovy language. In affected versions sending an invalid Content Type header leads to memory leak in DefaultArgumentConversionContext as this type is erroneously used in static state. ### Impact Sending an invalid Content Type header leads to memory leak in `DefaultArgumentConversionContext` as this type is erroneously used in static state. ### Patches The problem is patched in Micronaut 3.2.7 and above. ### Workarounds The default content type binder can be replaced in an existing Micronaut application to mitigate the issue: ```java package example; import java.util.List; import io.micronaut.context.annotation.Replaces; import io.micronaut.core.convert.ConversionService; import io.micronaut.http.MediaType; import io.micronaut.http.bind.DefaultRequestBinderRegistry; import io.micronaut.http.bind.binders.RequestArgumentBinder; import jakarta.inject.Singleton; @Singleton @Replaces(DefaultRequestBinderRegistry.class) class FixedRequestBinderRegistry extends DefaultRequestBinderRegistry { public FixedRequestBinderRegistry(ConversionService conversionService, List<RequestArgumentBinder> binders) { super(conversionService, binders); } @Override protected void registerDefaultConverters(ConversionService<?> conversionService) { super.registerDefaultConverters(conversionService); conversionService.addConverter(CharSequence.class, MediaType.class, charSequence -> { try { return MediaType.of(charSequence); } catch (IllegalArgumentException e) { return null; } }); } } ``` ### References Commit that introduced the vulnerability https://github.com/micronaut-projects/micronaut-core/commit/b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3 ### For more information If you have any questions or comments about this advisory: * Open an issue in [Micronaut Core](https://github.com/micronaut-projects/micronaut-core/issues) * Email us at [info@micronaut.io](mailto:info@micronaut.io)","provenance":"source","from":"CVE.org"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01188,"percentile":0.68659,"provenance":"source"},"cwes":[{"id":"CWE-400","name":"Uncontrolled Resource Consumption"}],"references":[{"url":"https://github.com/micronaut-projects/micronaut-core/security/advisories/GHSA-2457-2263-mm9f","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/micronaut-projects/micronaut-core/commit/b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3","tags":["x_refsource_MISC"]}],"priority":{"score":17.4,"factors":[{"name":"EPSS percentile","points":13.73},{"name":"CVSS severity","points":3.71}]},"vendorSlug":"micronaut-projects","affectedVersions":[{"vendor":"micronaut-projects","product":"micronaut-core","versions":["< 3.2.7"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2025-04-23T15:58:04.498253Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Maven","package":"io.micronaut:micronaut-http","vulnerableRanges":["<3.2.7"],"patched":["3.2.7"],"from":["GHSA-2457-2263-mm9f"],"provenance":"source"}],"summary":{"text":"The memory leak lives in micronaut-core, the core component of the micronaut-projects Micronaut framework, where sending an invalid Content Type header causes DefaultArgumentConversionContext to be erroneously retained in static state. An attacker with network access can trigger the leak remotely, without authentication or user interaction, by sending requests with invalid Content Type headers, gradually exhausting the application's memory and causing availability degradation.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:06:38Z"},"euvd":{"id":"EUVD-2022-0418","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-micronaut-projects-micronaut-core-cve-2022-21700","children":[{"from":"CVE-2022-21700","to":"CVE-2024-23639","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["http-server/src/main/java/io/micronaut/http/server/cors/CorsFilter.java"],"commits":["https://github.com/micronaut-projects/micronaut-core/commit/b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3","https://github.com/micronaut-projects/micronaut-core/commit/01adb21e57137caaf7004313d2055c5a78b1f47b"],"basis":"rarely changed file"}]}]}}