/

CVE-2026-55153

Severity:

HIGH RISK

(7.1)

JNDI Injection & Gadget Abuse (CWE-470) in c3p0 Core

CVE-2026-55153

Awaiting Analysis

Vulnerability type

Category:

JNDI Injection / Unsafe Object Construction

CWE:

CWE-470, CWE-502

Impact:

Arbitrary Object Instantiation and Gadget Exploitation

Severity:

HIGH RISK

(7.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

mchange-commons-java's JavaBeanObjectFactory can instantiate arbitrary classes and set their properties based on JNDI data, enabling JNDI injection and deserialization gadget abuse.

When untrusted JNDI references or serialized objects are processed, attackers may provoke unexpected network calls or other side effects from within a trusted JVM context.

Affected context

This vulnerability appears in Java applications that use mchange-commons-java (commonly via c3p0 or other mchange projects) and rely on its JavaBeanObjectFactory and ReferenceIndirector when resolving JNDI lookups or reading serialized objects.

It becomes relevant in setups where JNDI references, resource descriptors, or serialized data may be influenced by external sources, application configuration, or infrastructure components without strict validation.

Exploit preconditions

  • Attack surface: JNDI lookups and Java deserialization paths that use mchange-commons-java's JavaBeanObjectFactory or ReferenceIndirector.
  • Required access: Ability to supply or influence JNDI Reference objects, resource configuration, or serialized objects consumed by the application.
  • Trigger point: Resolution of a JNDI reference or dereferencing of an indirect reference / serialized object that is processed by JavaBeanObjectFactory.
  • Why exploitation is possible: The factory can construct arbitrary classes and set "JavaBean"-style properties from attacker-controlled data, which for certain classes act as deserialization gadgets or cause network activity and other side effects.

Why this happens

The underlying issue is a combination of CWE-470: Use of Externally-Controlled Input to Select Classes or Code and CWE-502: Deserialization of Untrusted Data.

JavaBeanObjectFactory trusts JNDI-provided class names and property values, instantiating arbitrary types and initializing their fields without restricting which classes may be constructed or what properties may be set.

This generic "bean construction" pattern interacts dangerously with classes whose setters or initialization logic trigger external calls or gadget behavior, allowing attackers to chain property assignments into meaningful exploits.

ReferenceIndirector further extends the attack surface by enabling indirect references to be dereferenced wherever Java-serialized objects are read, amplifying the reach of unsafe object instantiation.

Potential impact

  • Attackers may provoke HTTP GET or other network requests to arbitrary URLs from inside the JVM.
  • Applications could inadvertently access external or internal services from a trusted network zone.
  • Deserialization gadgets may be leveraged to escalate impact, potentially leading to arbitrary code execution depending on available gadget chains.
  • Misuse of JNDI and gadget classes can result in data exfiltration or interaction with sensitive internal endpoints.

General mitigation guidance

Effective mitigation patterns focus on reducing trust in externally controlled class selection and limiting which types can be instantiated via configuration or JNDI.

Common defensive approaches include:

  • Restricting JNDI ObjectFactory behavior to a small, vetted set of safe classes, instead of allowing arbitrary type names from references.
  • Avoiding generic "JavaBean" instantiation mechanisms for data coming from JNDI, serialized objects, or other untrusted channels.
  • Designing configuration and resource resolution paths so that class names and critical properties are fixed at deploy-time and not influenced by runtime input.
  • Minimizing or eliminating use of Java deserialization for untrusted or semi-trusted data and preferring structured formats with strict schema validation.
  • Applying least-privilege at the application level to limit the consequences of any unexpected network or resource access triggered by gadget behavior.

How teams detect issues like this

Detection commonly starts with code and configuration review focused on JNDI usage and deserialization flows.

Useful strategies include:

  • Static analysis rules that flag use of generic ObjectFactory implementations capable of constructing arbitrary classes based on external input.
  • Auditing JNDI resource definitions, environment properties, and serialized object handling for patterns where class names, factory types, or properties derive from externally influenced data.
  • Establishing secure coding policies that prohibit unconstrained bean instantiation from JNDI references or serialized data and requiring explicit whitelists for ObjectFactories.
  • Leveraging automated security review tools to identify deserialization entry points, JNDI lookups, and indirect reference dereferencing, then validating these locations against organizational policies.

Sources

SourceLink
github.comgithub.com/swaldman/mchange-commons-java/security/advisories/GHSA-h84g-69h7-mw6v

Frequently asked

questions

No. While deserialization gadgets can potentially lead to remote code execution in some environments, the vulnerability more broadly enables arbitrary object instantiation and property setting, which may cause network requests, data exposure, or other side effects depending on the classes involved.

An attacker generally needs the ability to influence JNDI references, resource descriptors, or serialized objects processed by the application. This could be through configuration manipulation, control over directory entries, or injection into data streams that are later deserialized.

The safest approach is to avoid generic bean factories for JNDI or serialized data and instead use explicit, tightly controlled factories that only instantiate known-safe classes. Additionally, remove or strictly limit any mechanism that dereferences indirect references or class names derived from untrusted sources.

Preventing similar issues requires treating class selection and object construction as security-sensitive operations: avoid using externally supplied class names; restrict instantiation to whitelisted types; minimize use of Java deserialization; and enforce policies through code review and static analysis so that JNDI and configuration handling remain predictable and safe.

Find out what's already
exploitable in your codebase.