GHSA-m2cm-222f-qw44
mchange-commons-java: Remote Code Execution via JNDI Reference Resolution
Quick fix
GHSA-m2cm-222f-qw44 — com.mchange:mchange-commons-java: upgrade to the fixed version with the command below.
# pom.xml: bump <version>0.4.0</version> for com.mchange:mchange-commons-javaDetails
### Impact mchange-commons-java includes code that mirrors early implementations of JNDI functionality, including support for remote `factoryClassLocation` values, by which code can be downloaded and invoked within a running application. If an attacker can provoke an application to read a maliciously crafted `jaxax.naming.Reference` or serialized object, they can provoke the download and execution of malicious code.
Implementations of this functionality within the JDK were disabled by default behind a System property that defaults to `false`, `com.sun.jndi.ldap.object.trustURLCodebase`. However, since mchange-commons-java includes an independent implementation of JNDI derefencing, libraries (such as c3p0) that resolve references via that implementation could be provoked to download and execute malicious code even after the JDK was hardened.
### Patches Mirroring the JDK patch, mchange-commons-java's JNDI functionality is now gated by configuration parameters that default to restrictive values. Those parameters are documented [here](https://www.mchange.com/projects/c3p0/#configuring_security).
### Workarounds No. Users should upgrade to mchange-commons-java >= 0.4.0. Earlier versions should be avoided on application CLASSPATHs.
### References
[c3p0, you little rascal — Hans-Martin Münch](https://mogwailabs.de/en/blog/2025/02/c3p0-you-little-rascal/) [c3p0 documentation, security note](https://www.mchange.com/projects/c3p0/#security-note) [c3p0 documentation, configuring security](https://www.mchange.com/projects/c3p0/#configuring_security)
Are you affected?
Enter the version of the package you're using.
Affected packages
0Fixed in: 0.4.0# pom.xml: bump <version>0.4.0</version> for com.mchange:mchange-commons-javaReferences
- https://github.com/swaldman/mchange-commons-java/security/advisories/GHSA-m2cm-222f-qw44[WEB]
- https://nvd.nist.gov/vuln/detail/CVE-2026-27727[ADVISORY]
- https://github.com/swaldman/mchange-commons-java[PACKAGE]
- https://mogwailabs.de/en/blog/2025/02/c3p0-you-little-rascal[WEB]
- https://www.mchange.com/projects/c3p0/#configuring_security[WEB]
- https://www.mchange.com/projects/c3p0/#security-note[WEB]