From 4ce40bed4d8848449339351be67dc9ffe3154d43 Mon Sep 17 00:00:00 2001 From: Malayke Date: Thu, 26 Dec 2024 10:57:27 +0800 Subject: [PATCH] Improve GHSA-76h9-2vwh-w278 --- .../GHSA-76h9-2vwh-w278.json | 77 ++++++++++++++++++- 1 file changed, 73 insertions(+), 4 deletions(-) diff --git a/advisories/unreviewed/2024/12/GHSA-76h9-2vwh-w278/GHSA-76h9-2vwh-w278.json b/advisories/unreviewed/2024/12/GHSA-76h9-2vwh-w278/GHSA-76h9-2vwh-w278.json index ec7e9f4678e75..506551e4db8ef 100644 --- a/advisories/unreviewed/2024/12/GHSA-76h9-2vwh-w278/GHSA-76h9-2vwh-w278.json +++ b/advisories/unreviewed/2024/12/GHSA-76h9-2vwh-w278/GHSA-76h9-2vwh-w278.json @@ -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"