Security Vulnerability Report
中文
CVE-2026-42779 CVSS 9.8 CRITICAL

CVE-2026-42779

Published: 2026-05-01 11:16:20
Last Modified: 2026-05-01 17:55:29

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.

CVSS Details

CVSS Score
9.8
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:apache:mina:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:apache:mina:*:*:*:*:*:*:*:* - VULNERABLE
Apache MINA 2.1.0 - 2.1.11
Apache MINA 2.2.0 - 2.2.6

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import org.apache.mina.core.buffer.IoBuffer; import java.io.ByteArrayOutputStream; import java.io.ObjectOutputStream; import java.io.ObjectInputStream; public class CVE202642779PoC { public static void main(String[] args) { try { // Simulate creating a malicious serialized object (e.g., a gadget chain) ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(bos); // Replace with actual gadget chain payload in a real exploit oos.writeObject("MaliciousPayloadData"); oos.flush(); byte[] data = bos.toByteArray(); IoBuffer buffer = IoBuffer.wrap(data); // The vulnerability lies here: getObject() calls resolveClass() // which bypasses the allowlist for static/primitive branches. Object result = buffer.getObject(); System.out.println("Deserialized: " + result); } catch (Exception e) { e.printStackTrace(); } } }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-42779", "sourceIdentifier": "[email protected]", "published": "2026-05-01T11:16:19.537", "lastModified": "2026-05-01T17:55:28.940", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "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:\n\n\n\n\n\n\n\n\n\n\n\nApache 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.\n\n\n\n\nThe fix checks if the class is present in the accepted class filter before calling Class.forName(). \n\n\n\n\n\n\nAffected versions are Apache MINA 2.1.0 <= 2.1.11, and 2.2.0 <= 2.2.6.\n\n\n\n\n\nThe problem is resolved in Apache MINA 2.1.12, and 2.2.7 by \napplying the classname allowlist earlier.\n\n\n\n\n\nAffected are applications using Apache MINA that call IoBuffer.getObject().\n\n\n\n\n\nApplications using Apache MINA are advised to upgrade."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-502"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:apache:mina:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.1.0", "versionEndExcluding": "2.1.12", "matchCriteriaId": "BD7E18F5-1CE6-4CD7-8A0D-BD0C2574FF12"}, {"vulnerable": true, "criteria": "cpe:2.3:a:apache:mina:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.2.0", "versionEndExcluding": "2.2.7", "matchCriteriaId": "758E989E-5CB0-471C-AADB-43EB3FB95407"}]}]}], "references": [{"url": "https://lists.apache.org/thread/fhlx5k91hrkgyzh7yk1nghrn3k27gxy0", "source": "[email protected]", "tags": ["Patch", "Vendor Advisory", "Mailing List"]}]}}