CVE-2024-52046
NoneApache MINA Deserialization RCE Vulnerability
CVSS
—
EPSS
24.4%
Published
Dec 25, 2024
CISA due date
—
Cloudanix analysis
A flaw in a widely used networking library can let attackers run their own code on servers if the application processes certain incoming data without proper safeguards.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Remote Code Execution
- Component
- Library
- Class
- RCE
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Medium
What it actually does
The ObjectSerializationDecoder performs unsafe Java native deserialization on incoming data via IoBuffer#getObject when an ObjectSerializationCodecFactory is present in the filter chain, allowing arbitrary object instantiation and code execution without class allow-listing.
Why it matters to the business
Applications using Apache MINA for network protocols face potential full server compromise through remote code execution, leading to data breaches, service disruption, and the need for urgent library upgrades plus configuration changes to restore secure operation.
How an attack unfolds
An attacker identifies a MINA-based service exposing a ProtocolCodecFilter with ObjectSerializationCodecFactory, crafts a malicious serialized Java object containing a gadget chain for code execution, and sends it over the network; the decoder deserializes it without restrictions, triggering RCE. No public exploitation or named threat actors are associated at this time.
How to fix it
Upgrade Apache MINA core to 2.0.27, 2.1.10, or 2.2.4. After upgrade, explicitly configure the ObjectSerializationDecoder with one of the accept methods (ClassNameMatcher, Pattern, or wildcard patterns) to permit only required classes; the default now rejects all classes.
How to confirm the fix worked
Verify the MINA core JAR version matches a fixed release, inspect application code for ObjectSerializationCodecFactory usage, and confirm that an accept method has been invoked on the decoder instance rather than relying on the insecure default.
Typical attack path
- Locate MINA endpoints using ObjectSerializationCodecFactory in the codec filter chain
- Craft a malicious serialized payload leveraging available Java gadgets
- Transmit the payload to trigger IoBuffer#getObject deserialization
- Achieve remote code execution on the target process
How to detect it
Review application logs for unexpected deserialization errors or class loading attempts from the MINA decoder; examine network traffic for large or anomalous serialized payloads targeting MINA ports; check process execution logs for unusual child processes spawned after MINA traffic.
What your security team should do
- Immediately audit all applications for use of ObjectSerializationCodecFactory or IoBuffer#getObject
- Upgrade to the specified fixed versions and implement explicit class allow-listing
- Replace ObjectSerializationCodecFactory with safer alternatives where possible
- Monitor EPSS trend and reassess exploit maturity as new information emerges
The record
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: 1. * 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)` 2. * 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)` 3. * 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 | Introduced | Fixed |
|---|---|---|---|
| Maven | org.apache.mina:mina-core | 2.0.0-M1 | 2.0.27 |
| Maven | org.apache.mina:mina-core | 2.1.0 | 2.1.10 |
| Maven | org.apache.mina:mina-core | 2.2.0 | 2.2.4 |
| Chainguard | apache-nifi | 0 | 2.1.0-r1 |
| Chainguard | apache-nifi-compat | 0 | 2.1.0-r1 |
| Chainguard | apache-nifi-toolkit | 0 | 2.1.0-r1 |
| Chainguard | jenkins-2 | 0 | 2.491-r2 |
| Chainguard | jenkins-2-openjdk-17 | 0 | 2.491-r2 |
| Chainguard | jenkins-2-openjdk-21 | 0 | 2.491-r2 |
| Chainguard | jenkins-compat | 0 | 2.491-r2 |
| Chainguard | jenkins-docker-agent | 0 | 2.491-r2 |
| Chainguard | jenkins-docker-agent-openjdk-17 | 0 | 2.491-r2 |
| Chainguard | jenkins-docker-agent-openjdk-21 | 0 | 2.491-r2 |
| Chainguard | jenkins-remoting | 0 | 2.491-r2 |
| Chainguard | jenkins-utils | 0 | 2.491-r2 |
| Debian:11 | mina | 0 | No fix |
| Debian:11 | mina2 | 0 | No fix |
| Debian:12 | mina | 0 | No fix |
| Debian:12 | mina2 | 0 | No fix |
| Debian:13 | mina | 0 | No fix |
| Debian:13 | mina2 | 0 | No fix |
| Ubuntu:16.04:LTS | mina | 0 | No fix |
| Ubuntu:16.04:LTS | mina2 | 0 | No fix |
| Ubuntu:18.04:LTS | mina | 0 | No fix |
| Ubuntu:18.04:LTS | mina2 | 0 | No fix |
| Ubuntu:20.04:LTS | mina | 0 | No fix |
| Ubuntu:20.04:LTS | mina2 | 0 | No fix |
| Ubuntu:22.04:LTS | mina | 0 | No fix |
| Ubuntu:22.04:LTS | mina2 | 0 | No fix |
| Ubuntu:24.04:LTS | mina | 0 | No fix |
| Ubuntu:24.04:LTS | mina2 | 0 | No fix |
| Ubuntu:24.10 | mina | 0 | No fix |
| Ubuntu:24.10 | mina2 | 0 | No fix |
| Ubuntu:25.04 | mina | 0 | No fix |
| Ubuntu:25.04 | mina2 | 0 | No fix |
| Ubuntu:25.10 | mina | 0 | No fix |
| Ubuntu:25.10 | mina2 | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | mina | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | mina2 | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | mina | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | mina2 | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | mina | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | mina2 | 0 | No fix |
| Wolfi | apache-nifi | 0 | 2.1.0-r1 |
| Wolfi | apache-nifi-compat | 0 | 2.1.0-r1 |
| Wolfi | apache-nifi-toolkit | 0 | 2.1.0-r1 |
| Wolfi | jenkins-2 | 0 | 2.491-r2 |
| Wolfi | jenkins-2-openjdk-17 | 0 | 2.491-r2 |
| Wolfi | jenkins-2-openjdk-21 | 0 | 2.491-r2 |
| Wolfi | jenkins-compat | 0 | 2.491-r2 |
| Wolfi | jenkins-docker-agent | 0 | 2.491-r2 |
| Wolfi | jenkins-docker-agent-openjdk-17 | 0 | 2.491-r2 |
| Wolfi | jenkins-docker-agent-openjdk-21 | 0 | 2.491-r2 |
| Wolfi | jenkins-remoting | 0 | 2.491-r2 |
| Wolfi | jenkins-utils | 0 | 2.491-r2 |
| maven | org.apache.mina/mina-core | 2.0.0-M1 | 2.0.27 |
| maven | org.apache.mina/mina-core | 2.1.0 | 2.1.10 |
| maven | org.apache.mina/mina-core | 2.2.0 | 2.2.4 |
Related vulnerabilities
- CVE-2026-22732 When applications specify HTTP response headers for servlet applications using Spring… Also affects apache-nifi
- CVE-2026-24281 Hostname verification in Apache ZooKeeper ZKTrustManager falls back to reverse DNS (PTR)… Also affects apache-nifi
- CVE-2026-24308 Improper handling of configuration values in ZKConfig in Apache ZooKeeper 3.8.5 and 3.9.4… Also affects apache-nifi
- CVE-2026-29062 jackson-core contains core low-level incremental ("streaming") parser and generator… Also affects apache-nifi
- CVE-2026-1225 ACE vulnerability in configuration file processing by QOS.CH logback-core up to and… Also affects apache-nifi
- CVE-2025-14763 Missing cryptographic key commitment in the Amazon S3 Encryption Client for Java may… Also affects apache-nifi
- CVE-2024-29371 In jose4j before 0.9.5, an attacker can cause a Denial-of-Service (DoS) condition by… Also affects apache-nifi
- CVE-2025-67735 Netty has a CRLF Injection vulnerability in io.netty.handler.codec.http.HttpRequestEncoder Also affects apache-nifi