Jul 29, 2026·7 min read·89 visits
OpenTelemetry Javaagent prior to 2.27.0 allows unauthenticated remote attackers to trigger heap memory exhaustion and Denial of Service (DoS) by sending oversized RMI context propagation payloads.
An uncontrolled resource consumption vulnerability in the OpenTelemetry Javaagent RMI context propagation mechanism allows remote unauthenticated attackers to cause a Denial of Service (DoS) via heap memory exhaustion.
The OpenTelemetry Javaagent provides auto-instrumentation capabilities for Java applications, injecting tracing, metrics, and logging facilities into various frameworks without requiring manual code modifications. Within this ecosystem, Remote Method Invocation (RMI) instrumentation is utilized to capture and trace remote calls across JVM boundaries. To maintain trace context across these distributed boundaries, the agent intercepts incoming and outgoing RMI invocations to propagate context payloads containing trace IDs, span IDs, and associated metadata.
The vulnerability, tracked as CVE-2026-54712, resides in how the OpenTelemetry Javaagent deserializes incoming RMI context propagation payloads. Specifically, when an RMI endpoint is monitored by an instrumented Java Virtual Machine, the agent attempts to parse trace context from the incoming stream. If the network interface exposing the RMI service is reachable by an unauthenticated attacker, malicious payloads can be transmitted directly to the instrumentation layer.
This flaw belongs to the class of Uncontrolled Resource Consumption (CWE-400), which can lead to complete Denial of Service (DoS) of the underlying application. By abusing the context propagation parsing logic, a remote attacker can force the Java Virtual Machine to allocate an excessive volume of heap memory, triggering a java.lang.OutOfMemoryError (OOM) and terminating the host process.
The root cause of CVE-2026-54712 is a lack of validation on the cumulative size of strings deserialized from the RMI context propagation stream. Distributed tracing agents must reconstruct context state from serialized inputs. In vulnerable versions of the OpenTelemetry Javaagent (2.26.1 up to, but excluding, 2.27.0), the context deserialization logic is handled by the ContextPayload class, which extracts keys and values directly from an incoming object input stream.
While the implementation implemented a check on the total number of map entries (MAX_CONTEXT_ENTRIES set to 1000) to prevent CPU-based denial of service or hash collision attacks, it omitted any verification of the length of the individual strings. The deserialization loop sequentially reads string keys and values using the ObjectInput.readUTF() method. This method reads a length indicator from the stream and attempts to allocate and construct a corresponding Java String instance.
Because Java's readUTF() function supports strings up to 65,535 bytes in length, an attacker can supply 1,000 entries where every key and value is of maximum length. The JVM is then forced to allocate memory for 1,000 keys and 1,000 values, each close to 64 KB, within a single short-lived network transaction. This results in the allocation of approximately 131 megabytes of heap memory per malicious payload, bypassing the entry-count limit and exhausting system resources when multiple concurrent requests are processed.
An analysis of the vulnerable source code in io.opentelemetry.javaagent.instrumentation.rmi.context.ContextPayload reveals the precise implementation weakness. The parsing mechanism reads an integer indicating the number of context entries, performs a simple boundary check against MAX_CONTEXT_ENTRIES, and then enters a loop to retrieve the string elements.
// Vulnerable Code Path (v2.26.1)
public static ContextPayload read(ObjectInput oi) throws IOException {
int size = oi.readInt();
if (size > MAX_CONTEXT_ENTRIES) { // Only limits entry count, not byte size
logger.log(FINE, "RMI context propagation payload size {0} exceeds...", size);
return null;
}
Map<String, String> map = new HashMap<>();
for (int i = 0; i < size; i++) {
String key = oi.readUTF(); // Allocates string up to 65535 characters
String value = oi.readUTF(); // Allocates string up to 65535 characters
map.put(key, value);
}
return new ContextPayload(map);
}The patch implemented in version 2.27.0 introduces two defensive layers. First, the MAX_CONTEXT_ENTRIES limit is lowered from 1,000 to 100, which aligns the threshold with standard corporate limits such as Tomcat's maxHeaderCount. Second, a new constant MAX_CONTEXT_SIZE (8,192 characters) is introduced, and a running total of character allocations is accumulated during the loop.
// Patched Code Path (v2.27.0)
public static ContextPayload read(ObjectInput oi) throws IOException {
int size = oi.readInt();
if (size > MAX_CONTEXT_ENTRIES) { // MAX_CONTEXT_ENTRIES is now 100
logger.log(FINE, "RMI context propagation entries count {0} exceeds...", size);
return null;
}
int contextSize = 0;
Map<String, String> map = new HashMap<>();
for (int i = 0; i < size; i++) {
String key = oi.readUTF();
String value = oi.readUTF();
contextSize += key.length() + value.length();
if (contextSize > MAX_CONTEXT_SIZE) { // MAX_CONTEXT_SIZE is 8192
logger.log(FINE, "RMI context propagation payload size exceeds maximum...");
return null; // Triggers early abort
}
map.put(key, value);
}
return new ContextPayload(map);
}> [!WARNING]
> Note that this check is post-facto. The readUTF() call still instantiates the String object into memory before its length is checked. While this prevents the massive accumulation across 100 entries, an attacker can still force the allocation of a single pair of large strings on the first iteration before the limit is exceeded. This minimal residual risk is unlikely to cause a Denial of Service unless executed under highly concurrent conditions.
Exploiting CVE-2026-54712 requires network line-of-sight to an RMI endpoint exposed by an application running the vulnerable OpenTelemetry Javaagent. Since RMI registries usually listen on default TCP ports such as 1099 or 1098, an attacker begins by identifying accessible RMI services on the target network. Authentication is not required because context propagation is intercepted and processed prior to standard application-level authentication checks.
To construct an exploit, a client sends standard RMI call structures containing a serialized ContextPayload object. The payload is carefully formatted to set the entry count integer to a value just below the validation threshold (e.g., 1000 for vulnerable versions). Each map entry is populated with long dummy string parameters composed of repeating characters to maximize payload volume while keeping computational overhead low.
When the agent receives the RMI packet, it invokes the deserialization routine. The JVM attempts to parse and instantiate the strings on the heap. Because multiple threads often process concurrent RMI calls, a sustained transmission of these oversized packets causes rapid heap consumption. The garbage collector becomes overwhelmed, leading to thread starvation, application unresponsiveness, and an eventual crash due to a java.lang.OutOfMemoryError.
The technical impact of CVE-2026-54712 is a complete loss of availability for the affected Java Virtual Machine. While CVSS v3.1 rates the availability impact as 'Low' (yielding a base score of 5.3), in practical enterprise scenarios, an unhandled java.lang.OutOfMemoryError typically leads to JVM crash or freeze. The process is either terminated by the operating system kernel (OOM Killer) or enters a state of perpetual garbage collection thrashing, rendering the service entirely unresponsive.
Because this vulnerability occurs within the auto-instrumentation agent itself, it affects any downstream application that relies on the agent for monitoring, regardless of whether the business logic itself utilizes RMI. If the target application exposes RMI endpoints for administrative tasks, JMX monitoring, or legacy middleware communications, the entire application becomes vulnerable to remote, unauthenticated disruption.
No confidentiality or integrity impacts are associated with this flaw. The exploit vector is strictly restricted to resource exhaustion and does not allow for remote code execution (RCE) or information disclosure. The vulnerability lacks an active exploitation record in the CISA KEV catalog, and EPSS scores suggest low exploitation probability in standard enterprise networks due to the declining prevalence of externally exposed RMI services.
Remediation requires upgrading the OpenTelemetry Javaagent to version 2.27.0 or higher. This release integrates strict cumulative size boundaries during RMI context parsing, ensuring that any payload exceeding 8,192 characters is rejected immediately, thereby mitigating the risk of heap exhaustion.
If upgrading is not immediately feasible, organizations can implement workarounds to eliminate the attack surface. The most effective workaround is to disable the RMI instrumentation module entirely. This can be accomplished by setting the environment variable OTEL_INSTRUMENTATION_RMI_ENABLED=false or passing the system property -Dotel.instrumentation.rmi.enabled=false at JVM startup.
Additionally, robust network access control lists (ACLs) should be deployed to prevent external networks from accessing RMI registries and communication ports (typically TCP 1099, 1098, and transient dynamic ports). Standard security best practices dictate that RMI and JMX services should never be exposed to the public internet or untrusted zones.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L| Product | Affected Versions | Fixed Version |
|---|---|---|
OpenTelemetry Java Instrumentation OpenTelemetry | >= 2.26.1, < 2.27.0 | 2.27.0 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-400 |
| Attack Vector | Network (AV:N) |
| CVSS v3.1 Score | 5.3 (Medium) |
| Vulnerability Type | Uncontrolled Resource Consumption |
| Exploit Status | Proof-of-Concept |
| CISA KEV Status | Not Listed |
The product does not properly control the allocation and maintenance of a limited resource, enabling an actor to influence the amount of resources consumed, leading to eventual exhaustion.
A path traversal vulnerability exists in the cakephp/twig-view plugin for the CakePHP framework prior to versions 1.3.3 and 2.1.2. The Cake\TwigView\Twig\FileLoader::findTemplate() method verifies template existence using PHP's native file_exists() function without ensuring the target path resides within configured application or plugin template directories. When user-controlled input is passed to template inclusion mechanisms, an unauthenticated remote attacker can read arbitrary local files accessible to the PHP runtime.
CVE-2026-64855 (GHSA-859w-52fx-hcm6) is a cryptographic signature verification and authentication bypass vulnerability in the soapbar Python library prior to version 0.13.0. In vulnerable versions, the verify_envelope_bsp() function derives its trust anchor directly from the incoming SOAP message by extracting an untrusted X.509 certificate embedded inside the wsse:BinarySecurityToken header. Because the function checks only the temporal validity of the extracted certificate without performing Certificate Authority (CA) chain validation or certificate pinning, an unauthenticated network attacker can generate a self-signed certificate, sign an arbitrary SOAP payload, and pass verification.
A denial-of-service vulnerability exists in the Go library github.com/insomniacslk/dhcp within the dhcpv4/nclient4 subpackage. In affected versions, the raw packet parsing function BroadcastRawUDPConn.ReadFrom subtracts the fixed 8-byte UDP header length from the IPv4 payload length declared in the packet header without first verifying that the declared payload length is at least 8 bytes. An unauthenticated attacker on an adjacent local network segment can broadcast or unicast a malformed IPv4 packet with a declared payload length between 0 and 7 bytes, causing a signed integer underflow that passes a negative slice bound into buf.Consume and triggers an unhandled Go runtime panic.
CVE-2026-63305 (GHSA-g9x9-q7qj-6mv5) is an operating system command injection vulnerability affecting WWBN AVideo (formerly YouPHPTube) versions up to and including 29.0. The defect resides in the standalone FFmpeg execution handler at plugin/API/standAlone/ffmpeg.json.php. When assembling asynchronous post-processing commands, the script concatenates the notifyCode and callback properties from a decrypted payload directly into a shell command string without sanitization. An attacker capable of providing or forging a valid encrypted execution payload can inject shell metacharacters to achieve remote code execution under the privileges of the web server user.
The cakephp/twig-view plugin integrates the Twig templating engine into the CakePHP framework. Prior to versions 1.3.3 and 2.1.2, the UtilsExtension class exposes PHP's native unserialize() function as a Twig filter without restricting allowed classes. When untrusted data is passed into the unserialize filter within a template, an attacker can trigger PHP Object Injection and execute Property-Oriented Programming (POP) gadget chains, leading to arbitrary code execution or data manipulation.
CVE-2026-63402 is a prototype-chain traversal and shared built-in object corruption vulnerability in the i18next internationalization framework for JavaScript prior to version 26.3.4. The flaw resides in the deepExtend utility function within src/utils.js, which uses the JavaScript 'in' operator to verify property existence on target objects. When an application passes untrusted resource bundles to i18next.addResourceBundle() with both the deep and overwrite parameters set to true, an attacker can traverse into inherited methods on Object.prototype and overwrite properties on shared built-in function objects, causing process-wide denial of service.