/

CVE-2026-33701

Severity:

CRITICAL RISK

(9.8)

Unsafe Deserialization in OpenTelemetry Java Instrumentation

CVE-2026-33701

Modified

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.8)

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

OpenTelemetry Java Instrumentation versions prior to 2.26.1 register a custom RMI endpoint that deserializes incoming data without applying serialization filters, exposing a critical unsafe deserialization flaw on JDK 16 and earlier.

When an attacker can reach a configured JMX/RMI management port on an instrumented JVM and a suitable gadget chain is present on the classpath, this condition may allow arbitrary remote code execution with the JVM's privileges.

Affected context

This vulnerability manifests in Java applications where:

  • OpenTelemetry Java Instrumentation is attached as a Java agent (-javaagent) on JDK 16 or earlier.
  • JMX/RMI remote management is explicitly enabled and bound to a reachable interface via -Dcom.sun.management.jmxremote.port.
  • The RMI-based OpenTelemetry instrumentation endpoint is active and processes serialized RMI calls.
  • One or more libraries on the application classpath expose gadget chains that can be abused during Java deserialization.

In such environments, the instrumented JVM's management port becomes a potential remote deserialization entry point.

Exploit preconditions

  • Attack surface: Network-accessible JMX/RMI management port on the JVM instrumented with OpenTelemetry Java Instrumentation.
  • Required access: Ability to open a TCP connection to the configured JMX/RMI port (no direct in-application authentication is handled by the RMI endpoint itself).
  • Runtime environment:
  • OpenTelemetry Java Instrumentation running as a Java agent (-javaagent option).
  • JVM version 16 or earlier (JDK 17+ is not affected in this way).
  • Configuration conditions:
  • JMX/RMI port explicitly configured via -Dcom.sun.management.jmxremote.port and bound to an interface reachable by the attacker.
  • RMI instrumentation not disabled (i.e., -Dotel.instrumentation.rmi.enabled is unset or true).
  • Application conditions:
  • Presence of at least one gadget-chain-compatible library on the classpath that can be leveraged during deserialization.
  • Why exploitation is possible:
  • The custom RMI endpoint deserializes attacker-controlled data without applying Java serialization filters or equivalent constraints.
  • Classic Java deserialization behavior allows construction and invocation of gadget chains during object read, enabling attacker-controlled code paths.

Why this happens

The root cause is an unsafe Java deserialization pattern in the OpenTelemetry RMI instrumentation, corresponding to CWE-502: Deserialization of Untrusted Data.

The instrumentation exposed a custom RMI endpoint that accepted serialized objects from remote clients and passed them directly into the Java deserialization mechanism without:

  • Enforcing serialization filters or whitelists to constrain which classes can be instantiated, or
  • Applying an alternative, non-deserialization-based protocol.

In Java, default object deserialization can invoke arbitrary code paths (e.g., readObject, readResolve, or other lifecycle hooks), and when gadget-chain-compatible libraries are on the classpath, these hooks can be composed into exploit chains.

Because the endpoint sits on a remotely accessible JMX/RMI port, the deserialization boundary effectively trusts unvetted network input, allowing an attacker to trigger execution of those gadget chains in the context of the instrumented JVM.

Potential impact

  • Remote execution of arbitrary code within the JVM process.
  • Full compromise of the application running on the instrumented JVM.
  • Reading, modification, or deletion of data handled by the compromised application.
  • Use of the compromised JVM as a pivot point for lateral movement within the network.
  • Disruption of services through process crashes, resource exhaustion, or intentional sabotage.
  • Planting of backdoors or persistence mechanisms in the affected environment.

General mitigation guidance

Effective mitigation focuses on removing unsafe deserialization pathways and shrinking the remote management attack surface:

  • Avoid deserialization of untrusted data:
  • Prefer protocols that use structured, non-executable data formats (e.g., JSON, protobuf) instead of Java native serialization for remote management or telemetry channels.
  • Where Java serialization cannot be easily removed, strictly limit which classes may be deserialized using serialization filters or explicit allowlists.
  • Constrain RMI/JMX exposure:
  • Avoid exposing JMX/RMI ports directly to untrusted networks; restrict them to loopback or dedicated management networks using host-level firewall rules or network segmentation.
  • Require strong authentication and encryption on management interfaces (e.g., secure JMX configurations, TLS, and access controls) so that only authorized operators can reach the endpoint.
  • Harden the instrumentation layer:
  • Disable unneeded integration points in instrumentation agents (e.g., turn off RMI-related instrumentation when RMI-based management is not essential).
  • Favor secure-by-default instrumentation settings that do not introduce new remotely reachable endpoints that process serialized data.
  • Reduce gadget-chain availability:
  • Review the application classpath for libraries known to contain powerful deserialization gadgets, especially older or broad-utility libraries.
  • Remove or update libraries where possible, and avoid adding unnecessary libraries that expand the gadget surface.
  • Apply least privilege:
  • Run JVM processes with minimal OS-level privileges so that, even if code execution is achieved, the attacker's capabilities are constrained.
  • Separate high-sensitivity components (e.g., databases, secrets stores) behind additional access controls so they are not directly reachable by a compromised JVM process.

How teams detect issues like this

Organizations can detect and monitor for this class of vulnerability using a combination of code-centric and operational approaches:

  • Static analysis and code scanning:
  • Search for usage of RMI or custom JMX/RMI handlers that call ObjectInputStream or equivalent serialization APIs on network inputs.
  • Flag deserialization operations that are not paired with explicit serialization filters or class allowlists.
  • Create rules for instrumented codebases that inspect third-party agents (including OpenTelemetry) for deserialization entry points.
  • Configuration and policy checks:
  • Periodically inventory JVM processes to identify those that:
  • Run on JDK 16 or earlier, and
  • Use -javaagent with OpenTelemetry Java Instrumentation, and
  • Expose -Dcom.sun.management.jmxremote.port on non-local interfaces.
  • Enforce policies prohibiting direct exposure of JMX/RMI ports to untrusted networks, validated via configuration management and network scans.
  • Runtime and network monitoring:
  • Monitor JMX/RMI ports for unexpected or anomalous connection patterns, such as repeated failed calls or unusual traffic from unrecognized sources.
  • Log and alert on deserialization exceptions or unexpected class loading patterns that may indicate probing of gadget chains.
  • Use host-based intrusion detection to watch for abnormal child processes or command executions originating from JVM-based services.
  • Automated review in CI/CD:
  • Integrate automated security checks into build pipelines to detect unsafe deserialization patterns and insecure remote management configurations.
  • Include reviews of agent configuration files and JVM startup options to ensure they conform to secure operational standards.

Sources

SourceLink
github.comgithub.com/open-telemetry/opentelemetry-java-instrumentation/commit/9cf4fbaaa9e79226142b2ed42a6f6b4ac0be2197
github.comgithub.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v2.26.1
github.comgithub.com/open-telemetry/opentelemetry-java-instrumentation/security/advisories/GHSA-xw7x-h9fj-p2c7
access.redhat.comaccess.redhat.com/security/cve/CVE-2026-33701
bugzilla.redhat.combugzilla.redhat.com/show_bug.cgi?id=2452071
security.access.redhat.comsecurity.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-33701.json

Frequently asked

questions

Yes, provided the JMX/RMI management port of the instrumented JVM is network-reachable, an attacker can remotely send crafted serialized data to the vulnerable RMI endpoint.

The attacker needs the ability to establish a network connection to the configured JMX/RMI port on a JVM running OpenTelemetry Java Instrumentation on JDK 16 or earlier, and the application classpath must include a suitable gadget chain.

The safest pattern is to eliminate Java native deserialization of untrusted input entirely, replacing it with safer data formats, and to avoid introducing remote endpoints that rely on Java serialization. Where deserialization cannot be removed, enforce strict serialization filters and ensure management interfaces are not exposed to untrusted networks.

Adopt a development and operations policy that forbids deserializing data from untrusted sources, requires secure-by-default instrumentation and management configurations, and mandates regular review of remote management exposure. Combine static analysis, configuration checks, and network controls to catch unsafe deserialization and RMI/JMX usage early in the lifecycle.

Find out what's already
exploitable in your codebase.