Skip to content

Commit

Permalink
Merge pull request #5127 from github/Malayke-GHSA-76h9-2vwh-w278
Browse files Browse the repository at this point in the history
  • Loading branch information
advisory-database[bot] authored Dec 26, 2024
2 parents 1196687 + 4ce40be commit f05c0bc
Showing 1 changed file with 73 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,88 @@
"aliases": [
"CVE-2024-52046"
],
"details": "The ObjectSerializationDecoder in Apache MINA uses Java’s native deserialization protocol to process\nincoming serialized data but lacks the necessary security checks and defenses. This vulnerability allows\nattackers to exploit the deserialization process by sending specially crafted malicious serialized data,\npotentially leading to remote code execution (RCE) attacks.\n\n\n\n\t\t\t\t\t\n\n\n\t\t\t\t\n\n\n\t\t\t\n\n\n\t\t\n\n\n\t\nThis 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.\n\n\n\n\n\nIt'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.\n\n\n\n\nUpgrading 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:\n\n\n\n\n /**\n\n     * Accept class names where the supplied ClassNameMatcher matches for\n\n * deserialization, unless they are otherwise rejected.\n\n *\n\n * @param classNameMatcher the matcher to use\n\n */\n\n public void accept(ClassNameMatcher classNameMatcher)\n\n\n\n\n /**\n\n * Accept class names that match the supplied pattern for\n\n * deserialization, unless they are otherwise rejected.\n\n *\n\n * @param pattern standard Java regexp\n\n */\n\n public void accept(Pattern pattern) \n\n\n\n\n\n /**\n\n * Accept the wildcard specified classes for deserialization,\n\n * unless they are otherwise rejected.\n\n *\n\n * @param patterns Wildcard file name patterns as defined by\n\n * {@link org.apache.commons.io.FilenameUtils#wildcardMatch(String, String) FilenameUtils.wildcardMatch}\n\n */\n\n public void accept(String... patterns)\n\n\n\n\n\n\n\nBy default, the decoder will reject *all* classes that will be present in the incoming data.\n\n\n\n\n\n\n\nNote: The FtpServer, SSHd and Vysper sub-project are not affected by this issue.",
"summary": "Apache MINA Deserialization RCE Vulnerability",
"details": "The ObjectSerializationDecoder in Apache MINA uses Java’s native deserialization protocol to process\nincoming serialized data but lacks the necessary security checks and defenses. This vulnerability allows\nattackers to exploit the deserialization process by sending specially crafted malicious serialized data,\npotentially leading to remote code execution (RCE) attacks.\n\t\nThis 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.\n\nIt'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.\n\nUpgrading 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:\n\n\n```\n\n /**\n     * Accept class names where the supplied ClassNameMatcher matches for\n * deserialization, unless they are otherwise rejected.\n *\n * @param classNameMatcher the matcher to use\n */\n\n public void accept(ClassNameMatcher classNameMatcher)\n\n /**\n * Accept class names that match the supplied pattern for\n * deserialization, unless they are otherwise rejected.\n *\n * @param pattern standard Java regexp\n */\n\n public void accept(Pattern pattern) \n\n /**\n\n * Accept the wildcard specified classes for deserialization,\n * unless they are otherwise rejected.\n *\n * @param patterns Wildcard file name patterns as defined by\n * {@link org.apache.commons.io.FilenameUtils#wildcardMatch(String, String) FilenameUtils.wildcardMatch}\n */\n public void accept(String... patterns)\n\n```\n\nBy default, the decoder will reject *all* classes that will be present in the incoming data.\n\nNote: The FtpServer, SSHd and Vysper sub-project are not affected by this issue.",
"severity": [

],
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "org.apache.mina:mina-core"
},
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "2.0.0"
},
{
"fixed": "2.0.27"
}
]
}
],
"database_specific": {
"last_known_affected_version_range": "<= 2.0.26"
}
},
{
"type": "CVSS_V4",
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X"
"package": {
"ecosystem": "Maven",
"name": "org.apache.mina:mina-core"
},
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "2.1.0"
},
{
"fixed": "2.1.10"
}
]
}
],
"database_specific": {
"last_known_affected_version_range": "<= 2.1.9"
}
},
{
"package": {
"ecosystem": "Maven",
"name": "org.apache.mina:mina-core"
},
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "2.2.0"
},
{
"fixed": "2.2.4"
}
]
}
],
"database_specific": {
"last_known_affected_version_range": "<= 2.2.3"
}
}
],
"affected": [],
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-52046"
},
{
"type": "PACKAGE",
"url": "https://github.com/apache/mina"
},
{
"type": "WEB",
"url": "https://lists.apache.org/thread/4wxktgjpggdbto15d515wdctohb0qmv8"
Expand Down

0 comments on commit f05c0bc

Please sign in to comment.