CVE-2024-52046 — mina-core
CVE-2024-52046 is a Deserialization of Untrusted Data vulnerability in org.apache.mina:mina-core. EPSS puts its 30-day exploitation probability at 24.6% (98th percentile). A fix is available for org.apache.mina:mina-core — see the affected versions and patch details below.
Apache MINA: MINA applications using unbounded deserialization may allow RCE
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- A successful exploit gives an attacker total control of the affected component, not partial access.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2024-52046.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
org.apache.mina:mina-core☕org.apache.mina:mina-core☕org.apache.mina:mina-coreReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
The ObjectSerializationDecoder in Apache MINA uses Java’s native deserialization protocol to process incoming serialized data but lacks the necessary security checks and defenses. This vulnerability allows attackers to exploit the deserialization process by sending specially crafted malicious serialized data, potentially leading to remote code execution (RCE) attacks.
This issue affects MINA core versions 2.0.X, 2.1.X and 2.2.X, and will be fixed by the releases 2.0.27, 2.1.10 and 2.2.4.
It's also important to note that an application using MINA core library will only be affected if the IoBuffer#getObject() method is called, and this specific method is potentially called when adding a ProtocolCodecFilter instance using the ObjectSerializationCodecFactory class in the filter chain. If your application is specifically using those classes, you have to upgrade to the latest version of MINA core library.
Upgrading will not be enough: you also need to explicitly allow the classes the decoder will accept in the ObjectSerializationDecoder instance, using one of the three new methods:
/**
* Accept class names where the supplied ClassNameMatcher matches for
* deserialization, unless they are otherwise rejected.
*
* @param classNameMatcher the matcher to use
*/
public void accept(ClassNameMatcher classNameMatcher)
/**
* Accept class names that match the supplied pattern for
* deserialization, unless they are otherwise rejected.
*
* @param pattern standard Java regexp
*/
public void accept(Pattern pattern)
/**
* Accept the wildcard specified classes for deserialization,
* unless they are otherwise rejected.
*
* @param patterns Wildcard file name patterns as defined by
* {@link org.apache.commons.io.FilenameUtils#wildcardMatch(String, String) FilenameUtils.wildcardMatch}
*/
public void accept(String... patterns)
By default, the decoder will reject all classes that will be present in the incoming data.
Note: The FtpServer, SSHd and Vysper sub-project are not affected by this issue.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.apache.mina:mina-core | ≥ 2.2.0&&< 2.2.4 | 2.2.4org.apache.mina:mina-core:2.2.4 |
| ☕Maven | org.apache.mina:mina-core | ≥ 2.1.0&&< 2.1.10 | 2.1.10org.apache.mina:mina-core:2.1.10 |
| ☕Maven | org.apache.mina:mina-core | ≥ 2.0.0-M1&&< 2.0.27 | 2.0.27org.apache.mina:mina-core:2.0.27 |
Affected Products
minaapacheDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.apache.mina:mina-core, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.apache.mina:mina-core to 2.2.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2024-52046 is resolved across your whole dependency graph.
Workarounds
Do not deserialise data from untrusted sources: where the format allows it, restrict deserialisation to an explicit allowlist of expected types, and prefer a data-only format (JSON, Protobuf) over one that can reconstruct arbitrary objects until you can upgrade.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This vulnerability is rated as Important due to the risk of remote code execution via insecure Java deserialization in Apache MINA, where attackers can exploit the lack of security checks in the deserialization process, potentially compromising systems that use specific MINA classes. Apache Mina is a transitive…
Configure the Apache MINA ObjectSerializationDecoder to allow only the classes required by the application for deserialization, using accept(ClassNameMatcher), accept(Pattern), or accept(String... patterns). By default, the decoder rejects all classes in incoming data. Applications using the affected deserialization path should also upgrade Apache MINA core to a vendor-fixed release; upgrading alone is insufficient without explicitly configuring the allowed classes.Source: Red Hat security advisory for CVE-2024-52046 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat build of Apache Camel 4.8.3 for Spring Boot | mina-core | RHSA-2025:1078 |
Frequently Asked Questions
Is CVE-2024-52046 in your dependencies?
Find it across Maven, including transitive dependencies.