{"id":"CVE-2026-41433","aliases":["CVE-2026-41433","GHSA-8gmg-3w2q-65f4","GO-2026-5253"],"related":[],"kind":"vulnerability","state":"published","title":"OpenTelemetry eBPF Instrumentation: Privileged Java agent injection allows arbitrary host file overwrite via untrusted TMPDIR","summary":"OpenTelemetry eBPF Instrumentation provides eBPF instrumentation based on the OpenTelemetry standard. From 0.4.0 to before 0.8.0, a flaw in the Java agent injection path allows a local attacker controlling a Java workload to overwrite arbitrary host files when Java injection is enabled and OBI is running with elevated privileges. The injector trusted TMPDIR from the target process and used unsafe file creation semantics, enabling both filesystem boundary escape and symlink-based file clobbering. This vulnerability is fixed in 0.8.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"OpenTelemetry eBPF Instrumentation provides eBPF instrumentation based on the OpenTelemetry standard. From 0.4.0 to before 0.8.0, a flaw in the Java agent injection path allows a local attacker controlling a Java workload to overwrite arbitrary host files when Java injection is enabled and OBI is running with elevated privileges. The injector trusted TMPDIR from the target process and used unsafe file creation semantics, enabling both filesystem boundary escape and symlink-based file clobbering. This vulnerability is fixed in 0.8.0.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nA flaw in the Java agent injection path allows a local attacker controlling a Java workload to overwrite arbitrary host files when Java injection is enabled and OBI is running with elevated privileges. The injector trusted `TMPDIR` from the target process and used unsafe file creation semantics, enabling both filesystem boundary escape and symlink-based file clobbering.\n\n### Remediation\n\nUpgrade to https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/releases/tag/v0.8.0.\n\n### Details\n\nThe issue is in the Java agent staging logic in `pkg/internal/java/java_inject.go`.\n\nThe injector reads `TMPDIR` from the target process environment in `findTempDir(...)` and validates it with `dirOK(...)`. In the vulnerable implementation, `dirOK(...)` used `filepath.Join(root, dir)`, where `root` is `/proc/<pid>/root`. If `dir` is an absolute path, `filepath.Join` discards `root`, so values such as `/etc` or `/proc/1/root/etc` are resolved on the host instead of within the target process root.\n\nThat validated value is later reused in `copyAgent(...)` to build the destination path for the Java agent JAR. As a result, a malicious process can influence the privileged injector to write outside the intended `/proc/<pid>/root` boundary.\n\nThe file creation step further increases impact. The vulnerable code created the destination with `os.OpenFile(..., os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0o644)`. Because this does not use exclusive creation or symlink protections, an attacker can pre-create a symlink at the chosen destination, for example in a writable temp directory, and cause the injector to truncate or overwrite another file writable by the privileged OBI process.\n\nRelevant code paths:\n\n- `pkg/internal/java/java_inject.go`: `findTempDir(...)`\n- `pkg/internal/java/java_inject.go`: `dirOK(...)`\n- `pkg/internal/java/java_inject.go`: `copyAgent(...)`\n\nIn short, the vulnerability is caused by two issues acting together:\n\n1. Untrusted `TMPDIR` from the target process can escape the intended target root.\n2. The destination JAR is written with unsafe open semantics that allow clobbering via symlink or attacker-controlled destination selection.\n\n### PoC\n\nPrerequisites:\n\n- OBI is running with elevated privileges on the host.\n- Java injection is enabled.\n- The attacker can run or control a Java process on the same host.\n\nReproduction outline for the path escape case:\n\n1. Start a Java process with a controlled environment variable such as:\n   - `TMPDIR=/etc`\n   - or `TMPDIR=/proc/1/root/etc`\n2. Ensure the process is discovered by OBI and selected for Java agent injection.\n3. Wait for the injector to stage the agent JAR.\n4. Observe that the injector attempts to write `obi-java-agent.jar` outside `/proc/<pid>/root`, under the attacker-controlled host path.\n\nReproduction outline for the symlink clobber case:\n\n1. Start a Java process with `TMPDIR=/tmp` or another writable temp directory.\n2. Before injection occurs, create a symlink at the expected destination:\n   - `/tmp/obi-java-agent.jar -> /path/to/target/file`\n3. Trigger Java agent injection for that process.\n4. Observe that the privileged injector opens the symlink target with truncate semantics and overwrites the linked file contents.\n\nCode evidence:\n\n- `findTempDir(...)` reads `ie.FileInfo.Service.EnvVars[\"TMPDIR\"]`\n- `dirOK(...)` validates using `filepath.Join(root, dir)`\n- `copyAgent(...)` writes the JAR into the selected temp directory\n- the vulnerable write uses `os.OpenFile(..., os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0o644)`\n\n### Impact\n\nThis is an arbitrary file overwrite / file clobber vulnerability in a privileged host component.\n\nAffected users are deployments where:\n\n- Java injection is enabled\n- OBI runs with elevated privileges\n- untrusted local workloads can run Java processes on the same host\n\nAn attacker who can control a local Java process may be able to overwrite host files writable by OBI, which can lead to:\n\n- host integrity compromise\n- service disruption or denial of service\n- possible local privilege escalation depending on deployment details and overwritten targets\n\nThe issue is local rather than remote, but the impact is high because the vulnerable component operates with elevated privileges on the host.","format":"markdown","source":"ghsa"},{"lang":"en","text":"OpenTelemetry eBPF Instrumentation: Privileged Java agent injection allows arbitrary host file overwrite via untrusted TMPDIR in go.opentelemetry.io/obi","format":"markdown","source":"go"},{"lang":"es","text":"OpenTelemetry eBPF Instrumentation proporciona instrumentación eBPF basada en el estándar OpenTelemetry. Desde 0.4.0 hasta antes de 0.8.0, un fallo en la ruta de inyección del agente Java permite a un atacante local que controla una carga de trabajo Java sobrescribir archivos de host arbitrarios cuando la inyección Java está habilitada y OBI se ejecuta con privilegios elevados. El inyector confiaba en TMPDIR del proceso objetivo y utilizaba semánticas de creación de archivos inseguras, lo que permitía tanto el escape de límites del sistema de archivos como la sobrescritura de archivos basada en enlaces simbólicos. Esta vulnerabilidad está corregida en 0.8.0.","source":"nvd"}],"published":"2026-04-17T22:21:41.000Z","modified":"2026-10-26T22:10:00.163Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:H","score":8.4,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:H","score":8.4,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:H","score":8.4,"rating":"HIGH"}],"cwes":["CWE-22","CWE-59"],"affected":[{"ranges":[{"version":">= 0.4.0, < 0.8.0","status":"affected"}],"vendor":"open-telemetry","product":"opentelemetry-ebpf-instrumentation","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.4.0","status":"affected","fixed":"0.8.0"}],"ecosystem":"Go","package":"go.opentelemetry.io/obi","purl":"pkg:golang/go.opentelemetry.io/obi","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.4.0","status":"affected","fixed":"0.8.0"}],"ecosystem":"Go","package":"go.opentelemetry.io/obi","purl":"pkg:golang/go.opentelemetry.io/obi","source":"go"},{"ranges":[{"status":"affected","introduced":"0.4.0","fixed":"0.8.0"}],"vendor":"opentelemetry","product":"opentelemetry_ebpf_instrumentation","cpe":"cpe:2.3:a:opentelemetry:opentelemetry_ebpf_instrumentation:*:*:*:*:*:go:*:*","source":"nvd"}],"references":[{"url":"https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/security/advisories/GHSA-8gmg-3w2q-65f4","tags":["advisory","exploit","third-party-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/releases/tag/v0.8.0","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41433","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-04-25T01:51:46.381Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-41433","url":"https://www.cve.org/CVERecord?id=CVE-2026-41433","licence":"CVE Terms of Use","modified":"2026-04-25T01:52:06.558Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-8gmg-3w2q-65f4","url":"https://github.com/advisories/GHSA-8gmg-3w2q-65f4","licence":"CC-BY-4.0","modified":"2026-06-25T19:56:34.730Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5253","url":"https://pkg.go.dev/vuln/GO-2026-5253","licence":"CC-BY-4.0","modified":"2026-06-25T19:45:20.776Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-41433","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41433","licence":"Public domain","modified":"2026-10-26T22:10:00.163Z"}],"updatedAt":"2026-11-25T22:59:19.580Z","epss":{"score":0.00224,"percentile":0.0766,"date":"2026-11-30T12:00:22.000Z"}}