CVE-2026-55223: c3p0 exposes a deserialization "sink" via JDBC DataSource bean properties
Impact
The JDBC spec defines the interface DataSource, with a method called getConnection(), and ConnectionPoolDataSource, with a method called getPooledConnection(). These methods are potentially dangerous. One way or another they trigger calls into JDBC drivers, which themselves are complicated, flexible tools which may be, and in practice sometimes have proven to be, susceptible to abuse.
Unfortunately, the JavaBean framework treats methods of this form, getXXX(), as JavaBean "properties", which JavaBean-related libraries often presume represent quick, safe-to-look-up, state or configuration.
Attackers therefore can construct malicious DataSource objects — objects whose calls to getConnection() or getPooledConnection() would trigger attacks via vulnerable JDBC drivers — and bundle them in contexts that automatically look up bean properties on deserialization. If an attacker can smuggle such an object in serialized form to a location from which an application will deserialize it, an attack is triggered.
It's not easy. It requires that a susceptible JDBC DataSource or ConnectionPoolDataSource be available on the application CLASSPATH, along with a susceptible JDBC driver, and a carrier that will automatically look up JavaBean properties on deserialization. In practice, the most common such carrier is the composition of a collection and a Comparator implementation that sorts based on JavaBean properties from Apache commons-beanutils.
But c3p0 prior to 0.14.0 offered the susceptible JDBC DataSource or ConnectionPoolDataSource, supplying an essential component of the trigger.
Patches
c3p0 versions 0.14.0 and above no longer participate in this class of attack, because they include explicit BeanInfo classes which exclude connection and pooledConnection from the list of "introspected" JavaBean properties. Since getConnection() and getPooledConnection() no longer define JavaBean properties, classes that promiscuously read JavaBean properties do not call them, and the attack is averted.
Workarounds
If users can ensure the safety of all JDBC drivers on the application CLASSPATH, or that no libraries lie on the CLASSPATH that can be composed to trigger automatic JavaBean property lookups on deserialization, then this attack is prevented. Nevertheless, given the complexity of modern JDBC drivers and typical Java application transitive dependencies, it is strongly recommended that users upgrade to c3p0 version 0.14.0 or higher.
Some versions of this attack are foiled by the stronger encapsulation and restriction of reflective access introduced in Java 16. Running applications on Java 16+ is therefore a potential mitigation.
This attack is described by Hans-Martin Münch in a blog post called "Look Mama, no TemplatesImpl".
Other sources
c3p0 is a JDBC Connection pooling library. In versions prior to 0.14.0, c3p0 in combination with other libraries, can compose to a "sink" for deserialization gadgets. The JDBC spec's DataSource.getConnection() and ConnectionPoolDataSource.getPooledConnection() match the getXXX() form, so JavaBean libraries treat them as "properties" assumed safe while they actually call into JDBC drivers. Attackers can thus craft malicious DataSource objects whose property lookups invoke vulnerable drivers, then smuggle them in serialized form to where an application deserializes and auto-resolves bean properties — triggering the attack. This requires a susceptible DataSource/ConnectionPoolDataSource and JDBC driver on the CLASSPATH, plus a carrier that auto-looks-up JavaBean properties on = deserialization, most commonly a collection paired with an Apache commons-beanutils Comparator that sorts by bean properties. c3p0 supplied that susceptible DataSource/ConnectionPoolDataSource, which was an essential component of the trigger. This issue has been fixed in version 0.14.0.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
maven/com.mchange:c3p0to a version that resolves this vulnerability.Fixed in 0.14.0 - Upgrade
Upgrade
c3p0to a version that resolves this vulnerability.Fixed in 0.14.0 - Compensating control
Ensure safety of all JDBC drivers on the application CLASSPATH (i.e., no libraries lie on the CLASSPATH that can be composed to trigger automatic JavaBean property lookups on deserialization).
- Compensating control
If applicable, run applications on Java 16+ (Java 16 stronger encapsulation and restriction of reflective access is described as a potential mitigation).
- Compensating control
Prevent the common carrier mechanism by avoiding usage of a collection paired with an Apache commons-beanutils Comparator that sorts based on JavaBean properties from commons-beanutils.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-55223?
CVE-2026-55223 has a medium severity rating of 6.3 based on the CVSS score.
How do I fix CVE-2026-55223?
To fix CVE-2026-55223, upgrade c3p0 to version 0.14.0 or later.
What type of vulnerability is CVE-2026-55223?
CVE-2026-55223 is a deserialization vulnerability related to c3p0 exposing a 'sink' via JDBC DataSource bean properties.
Which software is affected by CVE-2026-55223?
CVE-2026-55223 affects the c3p0 JDBC Connection pooling library.
When was CVE-2026-55223 published?
CVE-2026-55223 was published on June 30, 2026.