Skip to content

OpenTelemetry OTLP disk retry temp-blob injection (GHSA-4625-4j76-fww9 / CVE-2026-42191)

Signal: GitHub Security Advisories published 2026-04-30. OpenTelemetry .NET OTLP exporter disk retry could fall back to shared temp directories and trust predictable retry blob paths.

What it is

When OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY=disk was enabled without OTEL_DOTNET_EXPERIMENTAL_OTLP_DISK_RETRY_DIRECTORY_PATH, OpenTelemetry.Exporter.OpenTelemetryProtocol used Path.GetTempPath() and fixed subdirectories such as traces, metrics, and logs for retry *.blob files.

On multi-user systems or shared temp roots, a local attacker could:

  • inject crafted retry blobs that the exporter later forwards to the configured OTLP collector under the application identity;
  • read queued telemetry blobs during export failures, exposing spans, metrics, logs, and possibly sensitive attributes;
  • deposit many or oversized blobs to exhaust disk/CPU/IO in retry loops.

Affected package: NuGet OpenTelemetry.Exporter.OpenTelemetryProtocol versions 1.8.0 through 1.15.2 when disk retry is enabled and no dedicated retry directory is configured. Fixed version: 1.15.3.

Reference: https://github.com/advisories/GHSA-4625-4j76-fww9

Triage

  1. Search .NET services for OpenTelemetry.Exporter.OpenTelemetryProtocol and disk retry environment variables.
  2. Identify hosts where app temp directories are shared with other users, tenants, jobs, sidecars, or containers.
  3. Check for /tmp/traces, /tmp/metrics, /tmp/logs, %TEMP%\traces, %TEMP%\metrics, or %TEMP%\logs containing unexpected *.blob files.
  4. Treat telemetry from affected windows as potentially tainted or disclosed if local attackers or co-tenants were present.

Mitigation

  • Upgrade OpenTelemetry.Exporter.OpenTelemetryProtocol to 1.15.3 or later.
  • Configure a dedicated retry directory with strict owner-only permissions whenever disk retry is enabled.
  • Avoid disk retry in shared or multi-tenant environments unless the retry path is private and quota-bound.
  • Keep telemetry exporter egress pinned to trusted collectors and protected by TLS.

Detection ideas

  • Monitor retry directories for unexpected owners, permissions, symlinks, or anomalous blob counts/sizes.
  • Alert when telemetry retry backlogs grow suddenly or exporter CPU/IO spikes during retry scans.
  • Inspect collector data for malformed or impossible spans/logs that could indicate blob injection.

Durable lesson

Retry queues are trust boundaries. If a process will later replay files with its identity, the queue path must be private, permission-checked, quota-bound, and never silently default to a shared temp root.

October 8 follow-up: same shape in native-library loaders (GHSA-mcr4-qmvw-px4g / CVE-2026-106451, high, yawkat lz4-java < 1.11.4)

net.jpountz.util.Native.load() extracts the bundled native library into java.io.tmpdir when no system liblz4-java is present and System.load()s it. Only the .lck sentinel gets a random, exclusively-created name; the library path is derived by stripping .lck, is predictable before creation, and is opened without exclusive creation. A co-tenant that wins the race controls the code loaded into every JVM that later uses the library, arbitrary-code-execution-grade local persistence in one shared temp root.

Operator rules for shared-host footholds (the recon half of this class):

  1. Enumerate loader-written temp artifacts. On any multi-user host, list predictable shared-temp library/bundle/queue names (lib*-java*.so, exporter retry blobs, extracted helper binaries). A file another user's process will later load()/replay with its identity is a standing local-privilege target.
  2. Race-shape check, bounded. The reportable primitive is "path is predictable and non-exclusive", prove with a marker file placed at the predicted path in a lab, never by loading code on a shared system. Evidence: the lock-file/library-file naming scheme, file owner, and load-order timeline.
  3. Grep-side fingerprint for audits: createTempFile followed by a derived (string-mangled) path used in System.load/dlopen/exec, the random name guards only the lock, not the payload. Same genealogy as the Oct 6 Nx world-connectable daemon UDS finding: the safely-created artifact and the actually-consumed artifact are different files.

October 14 follow-up: Metalama, sentinel-marker trust in shared temp, executed inside the compiler (CVE-2026-62847 / GHSA-m6wq-39m7-9xpp, medium/CVSS-v3 8.2, Metalama.Framework/Tool <2025.1.18, <2026.0.25, <2026.1.19)

Metalama (a .NET compile-time weaving tool) cached generated compile-time assemblies, extracted auxiliary executables, and unpacked embedded helper assemblies into predictable directories under Path.GetTempPath() (/tmp on Linux/macOS default) and decided "already built, trust it" from the presence of a sentinel/.completed marker file, no integrity check. An unprivileged local user pre-creates the deterministic cache tree, plants a malicious DLL plus the matching sentinel; when a higher-privileged user or CI/build service account next runs a build, the tool skips regeneration and loads/executes the planted assembly inside the compiler/IDE/MSBuild process = cross-user code execution on shared POSIX hosts (multi-user dev machines, shared CI runners). Windows default is unaffected (per-user temp ACLs).

Operator axes this adds beyond the lz4-java race leg:

  • Sentinel-as-trust is a greppable pattern distinct from the derived-path race. Here the attacker doesn't even need to win a race: existence of *.completed (or any done-marker convention) is the integrity verdict. Audit fingerprint: directory-exists + marker-file check preceding an assembly/exec load from any shared path. Enumeration on a shared runner: find /tmp -maxdepth 3 \( -name "*.completed" -o -name "done" -o -name ".sentinel" \) -newer /etc/hostname-style sweeps, then check who will later execute what sits beside the marker.
  • Build-tool caches are compiler-process code execution, i.e. a supply-chain position. Reading source/env and tampering build output happens inside the trusted build, so artifacts stay signed/trusted downstream. For CI foothold triage: enumerate which build plugins extract-and-load from shared temp before your first build on a runner, the plant precedes the privileged run by design.
  • Deterministic-cache-name check: derive the expected cache path from the tool's own naming scheme (package version, hash-of-what inputs) in a lab, prove with a marker DLL you never let a real build execute outside your own runner. The advisory's scope note doubles as a boundary rule: METALAMA_TEMP-style deployer overrides are config, not the defect, verify the default path on the box you're testing.
  • Same page lineage: exporter retry blobs (this page's original leg) → native-library loader (lz4-java) → compiler-time assembly cache (Metalama). Three layers, one rule: anything a later, more privileged process replays or loads from a shared root is a standing target, and the "was it already made safely?" verdict must come from ownership/integrity, not existence.

terragrunt catalog cloned each catalogued repository into <tmp>/catalog-<base64 sha1 of repo URL>, fully deterministic from the repo URL plus the temp-dir location, so a local co-tenant who knows (or guesses) which repos a victim catalogs computes the path in advance and plants a symlink there. Terragrunt followed the pre-existing symlink instead of rejecting it, then deleted an existing <repoName> directory and re-cloned into it through the link, outside the intended temp root, in the victim's security context. Fixed in v1.1.1 by abandoning the predictable path.

Operator axes this leg adds:

  • Destructive-first variant. Prior legs were load/exec hijacks; here the primitive is RemoveAll + re-clone through a symlink. On shared CI runners and multi-user dev boxes, a devtool that recursively deletes a path it derived from input data, after following symlinks, is a standing clobber target: pick a parent whose child dir name matches a well-known repo name you expect the victim to catalog.
  • Leaf-name constraint shapes targeting. The attacker controls the symlink's parent but not the leaf (<repoName> is fixed by the URL). Enumeration on a shared runner should therefore be anchored on repo names first: list plausible catalog targets, derive <tmp>/catalog-<base64 sha1(url)> for each (the derivation is public arithmetic), and check for a writable slot. Computation-in-advance is the differentiator versus race-window bugs, no timing needed.
  • TMPDIR/TMP/TEMP as boundary inputs. The vendor workaround names it: whoever controls the temp env var controls where deterministic paths resolve. On foothold triage, a process env that redirects a privileged tool's temp root is itself an attack surface (systemd units, CI env injection, .env files loaded by IaC wrappers).
  • Grep-side fingerprint: a hash-of-input-derived directory name joined under a shared temp root and passed into recursive-delete/clone/extract, sha1|sha256 → base64/hex → filepath.Join(os.TempDir()) → RemoveAll|Clone. Distinct from the createTempFile-derived-path fingerprint above: here nothing random is created at all.
  • Lineage now four layers: retry blobs → native-loader race → compiler sentinel cache → IaC catalog clone. Same rule, new verb: the "already exists, reuse/reset it" verdict on a name the attacker can compute is the defect, whether the follow-on action is load, exec, or delete.

October 23 follow-up: filelock trio, recursive delete on a remembered path in a non-sticky parent, engine-derived side files beside a lock DB, and an oplock that parks every acquire (GHSA-jqc4-5cvw-7w85, 9vhv-jxww-xfm5, 567q-5qvw-pf92; CVE-2026-112937/-112913/-112907, fixed filelock 4.2.1)

Anthropic OSS Scanner (ANT-2026-LSSZIUEO) + maintainer review rounds against filelock, the lock library every shared-cache tool on this page depends on. Three legs, all local co-tenant primitives on shared hosts, each a distinct reusable axis:

  • Cleanup by remembered path = delete-whatever-is-there-now. ReadWriteLock (SQLite-backed) shutil.rmtrees its private .filelock-* hard-link directory on a path remembered at creation, with no check that the path still names its own directory. A co-tenant who can rename in the parent (any 0777/group-writable cache/build dir without the sticky bit) renames the lock user's own directory onto that name, the lock user's process recursively deletes its own tree, silently. Route preconditions are broader than they look: every macOS connection since 4.1.1, and any Linux process without /proc/self/fd (chroot, containers that don't mount /proc). Rules: (1) "remembered path + recursive delete" is the destructive sibling of the derived-path race above, no race needed, two rename calls, same shape as the Terragrunt delete-then-reclone leg; (2) the sticky bit is an attack-recon checklist item on any shared host: find /tmp /var/tmp <shared caches> -type d \( -perm -0002 -o -perm -0020 \) ! -perm -1000 enumerates rename-squatting playgrounds before hunting per-tool bugs; (3) container/chroot shape changes exploitability class, a bug "not affected on stock Linux" may be live inside the container you actually landed in.
  • Embedded-engine side files are attacker-placed by convention. Windows ReadWriteLock opens the SQLite DB by path; SQLite then acts on <db>-journal/<db>-wal/<db>-shm before any lock statement runs. A co-tenant with create-but-not-delete in the DB's directory (C:\Windows\Temp, C:\Users\Public) plants a -wal + denies DELETE → every acquire() of the lock user dies with an uncatchable disk I/O error; a planted -journal gets replayed, deleting a file of the lock user's choosing. Rule: any library that hands a path to an embedded engine (SQLite, LMDB, RocksDB, levelDB) silently widens the writable set to engine-derived side paths nobody authorized, on shared Windows dirs, enumerate <target>-* sibling slots for any DB-backed service as a DoS/integrity foothold, and in source audits check whether side-file names are attacker-creatable before the engine's first touch.
  • An oplock is a parking primitive. Windows soft locks read/rename/delete their marker by path; os.open on an oplocked marker waits for the holder to answer the break. A co-tenant takes a Level 1 oplock on an unheld marker and never answers → every acquire() waits past timeout, blocking=False, and cancel_check, and the stale marker is never broken. Rule: API-level timeout/cancel parameters are not boundaries against OS-level blocking semantics, same "guard implemented in the wrong layer" family as the Host-header gate class; on Windows footholds, handle-blocking primitives (oplocks, file locks, reparse-point waits) park victim threads for free.

Collective operator takeaway: lock/coordinator libraries are load-bearing trust in every shared-cache tool on this page, when you have a local foothold on a multi-user box, sweep which tools use SQLite-backed or marker-file locking in shared dirs (grep -r "filelock\|ReadWriteLock"-style inventory in deployed venvs/apps) before deeper per-app hunting. Validation stays lab-bounded: disposable shared dirs you own, marker files, your own two uids; never plant side files or oplocks against other users' live processes. Lineage now five layers: retry blobs → native-loader race → compiler sentinel cache → IaC catalog clone → lock-library cleanup/side-files. Same rule, new verbs: the "already exists / by-convention path, trust it" verdict on a name or sibling the attacker can write is the defect, whether the follow-on action is load, exec, delete, or engine replay.