Apache MINA security advisories

Security information for Apache MINA

Reporting

Do you want disclose a potential security issue for Apache MINA? Send your report to the Apache Security Team.

Advisories

This section is experimental: it provides advisories since 2023 and may lag behind the official CVE publications. If you have any feedback on how you would like this data to be provided, you are welcome to reach out on our public mailinglist or privately on security@apache.org

Path traversal in org.apache.sshd:sshd-git

CVE-2026-48827 [CVE] [CVE json] [OSV json]

Last updated: 2026-06-01T08:37:39.905Z

Affected

  • Apache MINA SSHD from 2.0.0 through 2.17.1
  • Apache MINA SSHD from 3.0.0-M1 through 3.0.0-M3

Description

Path traversal vulnerability in Apache MINA SSHD bundle sshd-git. Lack of path validation in git-upload-pack, git-receive-pack, and other git operations allows users authenticated over SSH access to git repositories outside the configured git server root directory.

Applications are affected if they use org.apache.sshd:sshd-git. Applications not using sshd-git are not affected.

Users are advised to upgrade affected applications to Apche MINA SSHD 2.18.0, which fixes the issue.

The issue also is present in the pre-release milestones 3.0.0-M1 to 3.0.0-M3 for a new upcoming new major version 3.0.0. Again, applications are affected only if they use sshd-git. Upgrade affected applications to 3.0.0-M4.

We would like to point out that a professional git server should not rely solely on file system layout and permissions, but should implement additional security controls to govern access to git repositories and operations allowed on particular git repositories.





References

Credits

Critical Deserialization Allow-list Bypass via resolveProxyClass - ZDRES-232

CVE-2026-47065 [CVE] [CVE json] [OSV json]

Last updated: 2026-06-03T22:29:54.026Z

Affected

  • Apache MINA from 2.2.0 before 2.2.8
  • Apache MINA from 2.1.0 before 2.1.13
  • Apache MINA from 2.0.0 before 2.0.29

Description

ZDRES-232: resolveProxyClass Not Overridden - acceptMatchers Filter Bypass via java.lang.reflect.Proxy

Assessment: Fully addressed.

When the serialised stream contains a TC_PROXYCLASSDESC (the marker for a java.lang.reflect.Proxy ), JDK’s ObjectInputStream.readProxyDesc() is dispatched. JDK then calls the default ObjectInputStream.resolveProxyClass(interfaces) implementation, which performs Class.forName(intf, false, latestUserDefinedLoader()) for EACH interface name and constructs the proxy class — bypassing the accepted classes list .

ZDRES-233: Class.forName(name, initialize=true, classLoader) in readClassDescriptor Triggers Static Initialiser of Allow-Listed Classes

Assessment: Fully addressed.

For ANY class on the allow-list, deserialising a stream that names it triggers the class’s (static initialiser) BEFORE any instance is constructed. This means an attacker who supplies a class name on the allow-list (e.g., the developer wrote accept(“com.myapp.*") , attacker supplies com.myapp.SomeClass ) causes <clinit> of SomeClass — and many real-world classes have side-effecting static initialisers

Both issues have been fixed.


References

Credits

  • Venkatraman Kumar, SecureIn (reporter)
  • keda (GitHub: @yuui25) (reporter)

AbstractIoBuffer.resolveClass() null-clazz Branch Skips acceptMatchers Filter — Full Object Deserialization RCE (take 2)

CVE-2026-42779 [CVE] [CVE json] [OSV json]

Last updated: 2026-05-01T10:00:40.665Z

Affected

  • Apache MINA from 2.2.X through 2.2.6
  • Apache MINA from 2.1.X through 2.1.11

Description

The fix for CVE-2026-41635 was not applied to the 2.1.X and 2.2.X branches. Here was the original issue description:


Apache MINA's AbstractIoBuffer.resolveClass() contains two branches, one of them (for static classes or primitive types) does not check the class at all, bypassing the classname allowlist and allowing arbitrary code to be executed.

The fix checks if the class is present in the accepted class filter before calling Class.forName().

Affected versions are Apache MINA 2.1.0 <= 2.1.11, and 2.2.0 <= 2.2.6.

The problem is resolved in Apache MINA 2.1.12, and 2.2.7 by applying the classname allowlist earlier.

Affected are applications using Apache MINA that call IoBuffer.getObject().

Applications using Apache MINA are advised to upgrade.

References

Credits

  • Venkatraman Kumar, Securin (reporter)

CWE-502 Deserialization of Untrusted Data (take 2)

CVE-2026-42778 [CVE] [CVE json] [OSV json]

Last updated: 2026-05-01T10:01:08.442Z

Affected

  • Apache MINA from 2.2.X through 2.2.6
  • Apache MINA from 2.1.X through 2.1.11

Description

The fix for CVE-2026-41409 was not applied to the 2.1.X and 2.2.X branches. Here was the original issue description:

The fix for CVE-2024-52046 in Apache MINA AbstractIoBuffer.getObject() was incomplete. The classname allowlist of classes allowed to be deserialized was applied too late after a static initializer in a class to be read might already have been executed.

Affected versions are Apache MINA 2.1.0 <= 2.1.11, and 2.2.0 <= 2.2.6.

The problem is resolved in Apache MINA 2.1.12, and 2.2.7 by applying the classname allowlist earlier.

Affected are applications using Apache MINA that call IoBuffer.getObject().

Applications using Apache MINA are advised to upgrade

The fix for CVE-2024-52046 in Apache MINA AbstractIoBuffer.getObject() was incomplete. The classname allowlist of classes allowed to be deserialized was applied too late after a static initializer in a class to be read might already have been executed.

Affected versions are Apache MINA 2.1.0 <= 2.1.110, and 2.2.0 <= 2.2.6.

The problem is resolved in Apache MINA 2.1.12, and 2.2.7 by applying the classname allowlist earlier.

Affected are applications using Apache MINA that call IoBuffer.getObject().

Applications using Apache MINA are advised to upgrade

References

Credits

  • Venkatraman Kumar, Securin (reporter)

AbstractIoBuffer.resolveClass() null-clazz Branch Skips acceptMatchers Filter — Full Object Deserialization RCE

CVE-2026-41635 [CVE] [CVE json] [OSV json]

Last updated: 2026-04-27T09:15:40.308Z

Affected

  • Apache MINA from 2.2.0 through 2.2.5
  • Apache MINA from 2.1.0 through 2.1.10
  • Apache MINA from 2.0.0 through 2.0.27

Description

Apache MINA's AbstractIoBuffer.resolveClass() contains two branches, one of them (for static classes or primitive types) does not check the class at all, bypassing the classname allowlist and allowing arbitrary code to be executed.

The fix checks if the class is present in the accepted class filter before calling Class.forName()

Affected versions are Apache MINA 2.0.0 <= 2.0.27, 2.1.0 <= 2.1.10, and
2.2.0 <= 2.2.5.

The problem is resolved in Apache MINA 2.0.28, 2.1.11, and 2.2.6 by applying the classname allowlist earlier.

Affected are applications using Apache MINA that call  IoBuffer.getObject().

Applications using Apache MINA are advised to upgrade.

References

Credits

  • Venkatraman Kumar, Securin (reporter)

CWE-502 Deserialization of Untrusted Data

CVE-2026-41409 [CVE] [CVE json] [OSV json]

Last updated: 2026-04-27T09:20:11.275Z

Affected

  • Apache MINA from 2.2.0 through 2.2.5
  • Apache MINA from 2.1.0 through 2.1.10
  • Apache MINA from 2.0.0 through 2.0.27

Description

The fix for CVE-2024-52046 in Apache MINA AbstractIoBuffer.getObject() was incomplete. The classname allowlist of classes allowed to be deserialized was applied too late after a static initializer in a class to be read might already have been executed.

Affected versions are Apache MINA 2.0.0 <= 2.0.27, 2.1.0 <= 2.1.10, and 2.2.0 <= 2.2.5.

The problem is resolved in Apache MINA 2.0.28, 2.1.11, and 2.2.6 by applying the classname allowlist earlier.

Affected are applications using Apache MINA that call IoBuffer.getObject().

Applications using Apache MINA are advised to upgrade

References

Credits

  • Venkatraman Kumar, Securin (reporter)

MINA applications using unbounded deserialization may allow RCE

CVE-2024-52046 [CVE] [CVE json]

Last updated: 2025-02-12T09:33:34.969Z

Affected

  • Apache MINA from 2.0 through 2.0.26 unknown
  • Apache MINA from 2.1 through 2.1.9
  • Apache MINA from 2.2 through 2.2.3

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.

References

Credits

  • The initial report was submitted by Bofei Chen, with all the necessary bits to reproduce the RCE (finder)

integrity check bypass

CVE-2024-41909 [CVE] [CVE json] [OSV json]

Last updated: 2024-08-12T16:00:27.622Z

Affected

  • Apache MINA SSHD through 2.11.0

Description

Like many other SSH implementations, Apache MINA SSHD suffered from the issue that is more widely known as CVE-2023-48795. An attacker that can intercept traffic between client and server could drop certain packets from the stream, potentially causing client and server to consequently end up with a connection for which some security features have been downgraded or disabled, aka a Terrapin attack

The mitigations to prevent this type of attack were implemented in Apache MINA SSHD 2.12.0, both client and server side. Users are recommended to upgrade to at least this version. Note that both the client and the server implementation must have mitigations applied against this issue, otherwise the connection may still be affected.

References

Credits

  • Fabian Bäumer (finder)

Information disclosure bugs with RootedFilesystem

CVE-2023-35887 [CVE] [CVE json] [OSV json]

Last updated: 2023-07-19T07:18:05.211Z

Affected

  • Apache MINA SSHD from 1.0 before 2.10

Description

Exposure of Sensitive Information to an Unauthorized Actor vulnerability in Apache Software Foundation Apache MINA.

In SFTP servers implemented using Apache MINA SSHD that use a RootedFileSystem, logged users may be able to discover “exists/does not exist” information about items outside the rooted tree via paths including parent navigation ("..") beyond the root, or involving symlinks.

This issue affects Apache MINA: from 1.0 before 2.10. Users are recommended to upgrade to 2.10

References

Credits

  • Andrew Pikler (finder)

Apache MINA SSHD: Java unsafe deserialization vulnerability

CVE-2022-45047 [CVE] [CVE json] [OSV json]

Last updated: 2022-11-16T09:03:02.600Z

Affected

  • Apache MINA SSHD from unspecified through 2.9.1

Description

Class org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider in Apache MINA SSHD <= 2.9.1 uses Java deserialization to load a serialized java.security.PrivateKey. The class is one of several implementations that an implementor using Apache MINA SSHD can choose for loading the host keys of an SSH server.

References

Credits

  • The Apache MINA SSHD team would like to thank Zhang Zewei, NOFOCUS, for reporting this issue.

Apache MINA HTTP listener DOS

CVE-2021-41973 [CVE] [CVE json] [OSV json]

Last updated: 2021-11-01T08:33:24.585Z

Affected

  • Apache MINA from Apache MINA before 2.1.5

Description

In Apache MINA, a specifically crafted, malformed HTTP request may cause the HTTP Header decoder to loop indefinitely. The decoder assumed that the HTTP Header begins at the beginning of the buffer and loops if there is more data than expected. Please update MINA to 2.1.5 or greater.

References

DoS/OOM leak vulnerability in Apache Mina SSHD Server

CVE-2021-30129 [CVE] [CVE json] [OSV json]

Last updated: 2021-07-12T12:00:59.616Z

Affected

  • Apache Mina SSHD from 2.0.0 before Apache Mina SSHD*

Description

A vulnerability in sshd-core of Apache Mina SSHD allows an attacker to overflow the server causing an OutOfMemory error. This issue affects the SFTP and port forwarding features of Apache Mina SSHD version 2.0.0 and later versions. It was addressed in Apache Mina SSHD 2.7.0

References