---
id: "CVE-2026-116486"
kind: "vulnerability"
aliases: ["CVE-2026-116486"]
title: "Objenesis: class cache collision lets one loader substitute objects into another"
severity: "medium"
cvss: 4.5
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["java", "jvm", "mockito", "objenesis", "package"]
not_affected_if: ["no-shared-instance", "single-class-loader"]
published_at: "2026-10-26T14:16:37+00:00"
first_seen_at: "2026-10-26T14:30:37+00:00"
updated_at: "2026-10-26T14:32:50+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-116486", "first_seen_at": "2026-10-26T14:30:37+00:00"}]
---

# Objenesis: class cache collision lets one loader substitute objects into another

Objenesis before 3.6 caches instantiators by class name, so two same-named classes from different class loaders can collide in a shared ObjenesisStd instance. The result is newInstance() returning objects of the wrong class, causing ClassCastException failures and possible substitution of objects across loaders.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Look for `org.objenesis:objenesis` in your build files (`mvn dependency:tree | grep objenesis` or `gradle dependencies | grep objenesis`) and note the resolved version.
- Check whether code shares a single `ObjenesisStd` instance across multiple class loaders, such as in an app server, plugin system, or test framework.

## Fix

- Upgrade `org.objenesis:objenesis` to `3.6` or later.
- If upgrading is not possible, avoid sharing one `ObjenesisStd` instance across class loaders.

## Timeline

- 2026-10-26T14:30:37+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-116486

## From the sources

Objenesis before 3.6 contains a type confusion vulnerability that allows code in one class loader to substitute objects into another by exploiting instantiator caching keyed on class name. When a shared ObjenesisStd instance caches instantiators by clazz.getName() in ObjenesisBase.getInstantiatorOf(), same-named classes collide, causing newInstance() to return wrong-class objects and ClassCastException failures.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
