Skip to main content
COSMICBYTEZLABS
NewsSecurityHOWTOsToolsStudyTraining
ProjectsChecklistsAI RankingsNewsletterStatusTagsAbout
Subscribe

Press Enter to search or Esc to close

News
Security
HOWTOs
Tools
Study
Training
Projects
Checklists
AI Rankings
Newsletter
Status
Tags
About
RSS Feed
Reading List
Subscribe

Stay in the Loop

Get the latest security alerts, tutorials, and tech insights delivered to your inbox.

Subscribe NowFree forever. No spam.
COSMICBYTEZLABS

Your trusted source for IT intelligence, cybersecurity insights, and hands-on technical guides.

828+ Articles
121+ Guides

CONTENT

  • Latest News
  • Security Alerts
  • HOWTOs
  • Projects
  • Exam Prep

RESOURCES

  • Search
  • Browse Tags
  • Newsletter Archive
  • Reading List
  • RSS Feed

COMPANY

  • About Us
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CosmicBytez Labs. All rights reserved.

System Status: Operational
  1. Home
  2. Security
  3. CVE-2026-41635: Apache MINA Class Allowlist Bypass Enables Arbitrary Code Execution (CVSS 9.8)
CVE-2026-41635: Apache MINA Class Allowlist Bypass Enables Arbitrary Code Execution (CVSS 9.8)

Critical Security Alert

This vulnerability is actively being exploited. Immediate action is recommended.

SECURITYCRITICALCVE-2026-41635

CVE-2026-41635: Apache MINA Class Allowlist Bypass Enables Arbitrary Code Execution (CVSS 9.8)

Apache MINA's AbstractIoBuffer.resolveClass() contains a branch for static classes and primitive types that skips allowlist validation entirely, letting attackers bypass the class name allowlist and execute arbitrary code via crafted serialized network payloads.

Dylan H.

Security Team

April 28, 2026
7 min read

Affected Products

  • Apache MINA (all versions prior to fix)
  • AbstractIoBuffer (core deserialization path)

Executive Summary

A critical remote code execution vulnerability (CVE-2026-41635, CVSS 9.8) has been disclosed in Apache MINA, the widely used Java network application framework. The vulnerability resides in AbstractIoBuffer.resolveClass(), the method responsible for resolving class names during deserialization of network data. An internal branching logic intended to handle static classes and primitive types skips the classname allowlist check entirely, allowing an attacker to bypass MINA's deserialization protection and execute arbitrary code by sending a crafted serialized payload over the network.

Apache MINA is used in a wide range of networked Java applications including Apache FtpServer, Apache SSHD, and numerous enterprise network services that implement custom binary protocols.


Vulnerability Overview

AttributeValue
CVE IDCVE-2026-41635
CVSS Score9.8 (Critical)
CVSS VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredNone
User InteractionNone
ScopeUnchanged
Confidentiality / Integrity / AvailabilityHigh / High / High
Root CauseBranching logic in resolveClass() bypasses allowlist for static/primitive types
Affected ComponentAbstractIoBuffer.resolveClass()
Patch AvailableYes — see Apache advisory
PublishedApril 27, 2026

Technical Analysis

Root Cause: Branching Logic That Skips Allowlist

Apache MINA's AbstractIoBuffer provides buffer management for reading and writing data over network connections. When deserializing objects from a network buffer, resolveClass() is called to map the serialized class descriptor to a Java class. MINA added a classname allowlist to restrict which classes may be instantiated during deserialization — a sound defense against gadget chain attacks.

However, resolveClass() contains two branches:

// Simplified representation of the vulnerable code pattern
protected Class<?> resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException {
    String className = desc.getName();
 
    // Branch 1: Static classes or primitive types
    if (isStaticOrPrimitive(className)) {
        // BUG: Returns class directly WITHOUT checking the allowlist
        return Class.forName(className);
    }
 
    // Branch 2: Normal classes — allowlist IS checked
    if (!allowedClasses.contains(className)) {
        throw new InvalidClassException("Class not in allowlist: " + className);
    }
    return Class.forName(className);
}

An attacker can craft a serialized payload where the malicious class descriptor is processed through Branch 1 (the static/primitive branch), which resolves and instantiates the class without any allowlist check. This completely bypasses MINA's deserialization protection.

The fix, as described in the Apache advisory, ensures that all classes — including those categorized as static or primitive — are verified against the accepted class filter before instantiation.

What Makes "Static or Primitive" Classes Dangerous

In Java's serialization model, certain metadata about static fields and primitive types is encoded in the serialized stream. An attacker who controls the serialized payload can:

  1. Craft a class descriptor that triggers the "static/primitive" code path
  2. Embed a reference to a malicious class that is present on the MINA server's classpath
  3. When MINA deserializes the payload, resolveClass() resolves the malicious class via Branch 1
  4. The resolved class is instantiated during deserialization, triggering the gadget chain

Attack Flow

1. Attacker identifies a network service built on Apache MINA
   (FTP server, SSH server, custom binary protocol listener)
 
2. Attacker crafts a serialized Java payload that:
   - Encodes the malicious class reference in the "static/primitive" branch path
   - Embeds a gadget chain class available on the server classpath
 
3. Attacker sends the crafted payload over the network to the MINA listener
 
4. AbstractIoBuffer.resolveClass() processes the class descriptor:
   - isStaticOrPrimitive() returns true
   - Allowlist check is SKIPPED
   - Class.forName(maliciousClassName) instantiates the gadget chain class
 
5. Gadget chain executes during deserialization:
   - Arbitrary OS commands run as the MINA service account
 
6. Attacker achieves full remote code execution

Affected Deployments

Any service built on Apache MINA that:

  • Accepts serialized Java objects over the network
  • Relies on AbstractIoBuffer for data reading
  • Processes untrusted network input

is potentially exploitable. Common affected deployments include:

DeploymentDescription
Apache FtpServerBuilt on MINA — widely deployed FTP daemon
Apache SSHDJava SSH server implementation using MINA
Custom MINA ServicesEnterprise applications with custom binary protocol servers
IoT / Embedded Network ServicesMINA used in embedded Java network applications

Impact Assessment

Impact AreaDescription
Remote Code ExecutionUnauthenticated code execution as the service account
Server TakeoverFull control of the underlying host if the service runs as a privileged user
Data ExfiltrationAccess to all data accessible to the MINA service process
PersistenceAttacker can install backdoors before the vulnerability is patched
Lateral MovementCompromised FTP/SSH servers are frequently used as pivots into internal networks
Wide Attack SurfaceMINA underpins multiple Apache Foundation projects used across enterprise environments

Remediation

Step 1: Upgrade Apache MINA

Apply the patched version released by Apache. The fix ensures the allowlist check is applied in both branches of resolveClass().

<!-- Maven -->
<dependency>
  <groupId>org.apache.mina</groupId>
  <artifactId>mina-core</artifactId>
  <version>PATCHED_VERSION</version>
</dependency>
// Gradle
implementation 'org.apache.mina:mina-core:PATCHED_VERSION'

If using Apache FtpServer or Apache SSHD, also upgrade those to versions that bundle the patched MINA release.

Step 2: Restrict Network Access as an Immediate Mitigation

If patching cannot be applied immediately, restrict access to MINA-based service ports to trusted IP ranges only:

# Block untrusted access to MINA service port (example: FTP on 21)
iptables -I INPUT -p tcp --dport 21 -s 0.0.0.0/0 -j DROP
iptables -I INPUT -p tcp --dport 21 -s TRUSTED_CIDR -j ACCEPT
 
# Or use firewalld
firewall-cmd --zone=public --add-rich-rule='rule family="ipv4" \
  source address="TRUSTED_CIDR" port port="21" protocol="tcp" accept' --permanent
firewall-cmd --reload

Step 3: Apply a Custom resolveClass Override

As a temporary workaround, subclass the vulnerable MINA buffer class and override resolveClass() to enforce allowlist checking in all code paths:

public class HardenedIoBuffer extends AbstractIoBuffer {
    private final Set<String> allowedClasses;
 
    @Override
    protected Class<?> resolveClass(ObjectStreamClass desc)
            throws IOException, ClassNotFoundException {
        String className = desc.getName();
        // Always check the allowlist — no exceptions for static/primitive
        if (!allowedClasses.contains(className)) {
            throw new InvalidClassException(
                "Deserialization rejected: class not in allowlist: " + className
            );
        }
        return super.resolveClass(desc);
    }
}

Step 4: Apply a JVM-Level Serialization Filter

Configure a global ObjectInputFilter to restrict deserialization across the entire JVM:

# JVM startup argument
-Djdk.serialFilter=java.base/**;java.util.**;!*

Step 5: Audit for Compromise

# Search MINA service logs for deserialization-related errors or anomalies
grep -i "deserializ\|resolveClass\|InvalidClassException" /var/log/ftpserver/*.log
 
# Check for unexpected processes spawned by the MINA service
ps auxf | grep -A5 java
 
# Review outbound network connections from the service host
ss -tnp | grep ESTABLISHED

Detection Indicators

IndicatorDescription
InvalidClassException errors with unusual class names in logsAttacker probing — allowlist partially working
Unexpected child processes spawned from MINA service JVMSuccessful gadget chain execution
Outbound connections to unknown hosts from service serverPost-exploitation C2 or data exfiltration
Unfamiliar binaries or scripts appearing on service hostAttacker staging payloads
New administrative accounts or SSH keys on service hostPersistence installation

Post-Remediation Checklist

  1. Upgrade Apache MINA core to the patched version
  2. Upgrade Apache FtpServer, SSHD, and any other MINA-based services to patched versions
  3. Apply JVM-level serialization filters as a defense-in-depth measure
  4. Restrict network access to MINA service ports to trusted IP ranges
  5. Audit service logs for pre-patch exploitation indicators
  6. Inspect host file system for unexpected binaries, scripts, or cron jobs
  7. Rotate all service account credentials and SSH keys on affected hosts
  8. Review network egress logs for anomalous outbound connections
  9. Verify patch application by checking the MINA version bundled in deployed artifacts

References

  • NVD — CVE-2026-41635
  • Apache MINA Security Advisory
  • Apache FtpServer Project
  • Apache SSHD Project
#CVE-2026-41635#Apache MINA#Deserialization#RCE#CVSS 9.8#Allowlist Bypass#Java

Related Articles

CVE-2026-40860: Apache Camel JMS Unsafe ObjectMessage Deserialization Enables Network RCE (CVSS 9.8)

Apache Camel's JmsBinding class in camel-jms and camel-sjms deserializes incoming JMS ObjectMessage payloads via javax.jms.ObjectMessage.getObject() without applying any ObjectInputFilter, class allowlist, or denylist — giving unauthenticated remote attackers a direct path to arbitrary code execution on Camel servers.

7 min read

CVE-2026-26210: KTransformers Unsafe Deserialization RCE via Unauthenticated ZMQ RPC

KTransformers through version 0.5.3 contains a critical unsafe deserialization vulnerability in its balance_serve backend mode, where an unauthenticated...

6 min read

CVE-2026-6942: radare2-mcp OS Command Injection via Shell Metacharacter Filter Bypass

A critical OS command injection vulnerability in radare2-mcp 1.6.0 and earlier allows remote attackers to execute arbitrary commands by bypassing the...

5 min read
Back to all Security Alerts