mchange-commons-java contains elements susceptible to abuse via JNDI injection and "deserialization gadgets"
mchange-commons-java is a Java library of shared utility classes used by mchange projects like the c3p0 connection pool. Prior to version 0.6.0, its JNDI ObjectFactory implementation (com.mchange.v2.naming.JavaBeanObjectFactory) will construct objects of arbitrary classes and initialize "JavaBean"-style properties, which for certain classes enables JNDI injection and "deserialization gadgets." Such initialization is unsafe for some classes: for example, setting the contentType property of a Swing JEditorPane to text/html and its text property to HTML containing a stylesheet <link> will provoke an HTTP GET on an arbitrary URL, potentially from within a trusted security domain. The problem is aggravated by the library's ReferenceIndirector, through which malicious JNDI Reference objects can be smuggled in for dereferencing wherever an application reads a Java-serialized object. This has been resolved in version 0.6.0.
Problem Types
| Type | CWE ID | Description |
|---|
| CWE | CWE-502 | CWE-502: Deserialization of Untrusted Data |
| CWE | CWE-470 | CWE-470: Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') |
Type: CWE
Description: CWE-502: Deserialization of Untrusted Data
Type: CWE
Description: CWE-470: Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')
Metrics
| Version | Base score | Base severity | Vector |
|---|
| 3.1 | 7.1 | HIGH | CVSS:3.1/AV:A/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
Version: 3.1
Base score: 7.1
Base severity: HIGH
Vector: CVSS:3.1/AV:A/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H