High

c3p0 vulnerable to Remote Code Execution via unsafe deserialization of userOverridesAsString property

  • Disclosed: 25.02.2026
  • Updated: 11.10.2026 13:20

Impact

c3p0 is vulnerable to attack via maliciously crafted Java-serialized objects and javax.naming.Reference instances. Several c3p0 ConnectionPoolDataSource implementations have a property called userOverridesAsString which conceptually represents a Map<String,Map<String,String>>. Prior to v0.12.0, that property was maintained as a hex-encoded serialized object. Any attacker able to reset this property, on an existing ConnectionPoolDataSource or via maliciously crafted serialized objects or javax.naming.Reference instances could be tailored execute unexpected code on the application's CLASSPATH.

The danger of this vulnerability was strongly magnified by vulnerabilities in c3p0's main dependency, mchange-commons-java. This library includes code that mirrors early implementations of JNDI functionality, including ungated support for remote factoryClassLocation values. Attackers could set c3p0's userOverridesAsString hex-encoded serialized objects that include objects "indirectly serialized" via JNDI references. Deserialization of those objects and dereferencing of the embedded javax.naming.Reference objects could provoke download and execution of malicious code from a remote factoryClassLocation.

Although hazard presented by c3p0's vulnerabilites are exarcerbated by vulnerabilities in mchange-commons-java, use of Java-serialized-object hex as the format for a writable Java-Bean property, of objects that may be exposed across JNDI interfaces, represents a serious independent fragility.

Patches

The userOverridesAsString property of c3p0 ConnectionPoolDataSource classes has been reimplemented to use a safe CSV-based format, rather than rely upon potentially dangerous Java object deserialization.

c3p0-0.12.0+ and above depend upon mchange-commons-java 0.4.0+, which gates support for remote factoryClassLocation values by configuration parameters that default to restrictive values. Those parameters are documented here.

c3p0 additionally enforces the new mchange-commons-java com.mchange.v2.naming.nameGuardClassName to prevent injection of unexpected, potentially remote JNDI names.

Workarounds

Users should upgrade to c3p0-0.12.0 or above. There is no supported workaround for earlier versions of c3p0.

References

c3p0, you little rascal — Hans-Martin Münch c3p0 documentation, security note c3p0 documentation, configuring security

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Java / Kotlin (Maven) com.mchange:c3p0 < 0.12.0 0.12.0

References

CVSS score -
CVSS vector
CVSS:4.0/AV:A/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
Weakness (CWE)
CWE-502, CWE-94
Platform
Java / Kotlin (Maven)
Package
com.mchange:c3p0
Disclosed
25.02.2026
Updated
11.10.2026 13:20

Sources and licenses

OSV / GitHub Advisory Database - GHSA-5476-xc4j-rqcv - CC BY 4.0

Vulnerability history: com.mchange:c3p0

All published vulnerabilities of this package (Java / Kotlin (Maven)), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
4
First → latest
01.2019 07.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Critical 1
  • High 2
  • Medium 1

Disclosures per year

  1. 2019: 2
  2. 2020: 0
  3. 2021: 0
  4. 2022: 0
  5. 2023: 0
  6. 2024: 0
  7. 2025: 0
  8. 2026: 2
  1. c3p0 vulnerable to Remote Code Execution via unsafe deserialization of userOverridesAsString property this entry
    High CVE-2026-27830 < 0.12.0 0.12.0
  2. High · 7.5 CVE-2019-5427 < 0.9.5.4 0.9.5.4
  3. Critical · 9.8 CVE-2018-20433 < 0.9.5.3 0.9.5.3

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.