# CVE-2026-24051: OpenTelemetry Go SDK path hijacking in host_id.go on macOS

Source: https://junglewise.ai/threats/cve-2026-24051-opentelemetry-go-sdk-path-hijacking-in-host-id-go-on-macos  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-02-02. Updated: 2026-06-15  
License: CC BY 4.0 with a link back

CVE-2026-24051 · Severity: high · CVSS 7 · Published 2026-02-02

OpenTelemetry is a popular framework used by developers to monitor and observe application performance. A security flaw in the Go version of this tool on macOS allows a local attacker to trick the software into running malicious code instead of standard system commands. This could lead to a full system compromise or unauthorized access to sensitive application data if an attacker has already gained limited access to the machine.

Technologies: [go.opentelemetry.io/otel/sdk (Go)](https://junglewise.ai/threats/technologies/go-opentelemetry-io-otel-sdk), [Opentelemetry Go SDK](https://junglewise.ai/threats/technologies/go-sdk), [Opentelemetry](https://junglewise.ai/threats/technologies/opentelemetry). Vendors: [Go](https://junglewise.ai/threats/vendors/go), [Opentelemetry](https://junglewise.ai/threats/vendors/opentelemetry).

## Quick answers

**Is CVE-2026-24051 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-24051 being exploited in the wild.

**How severe is CVE-2026-24051?** High severity, with a CVSS score of 7, published 2 February 2026.

**Which products and versions are affected?** go.opentelemetry.io/otel/sdk (Go) SEMVER:introduced=1.21.0,fixed=1.40.0; Opentelemetry Go SDK v1.20.0 - v1.39.0.

**Is there a fix for CVE-2026-24051?** Yes. go.opentelemetry.io/otel/sdk (Go): upgrade to 1.40.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-24051 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-24051?** Check whether you run go.opentelemetry.io/otel/sdk (Go), Opentelemetry Go SDK or Opentelemetry at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- go.opentelemetry.io/otel/sdk (Go): upgrade to 1.40.0 or later

  ```sh
  go get go.opentelemetry.io/otel/sdk@v1.40.0
  ```


## Technical details

A Path Hijacking (Untrusted Search Path) vulnerability exists in the OpenTelemetry Go SDK's resource detection logic on macOS/Darwin. Specifically, the code in `sdk/resource/host_id.go` attempts to execute the `ioreg` system command without specifying an absolute path. An attacker with local access and the ability to modify the PATH environment variable can place a malicious executable named `ioreg` in a directory searched before the legitimate system path. When the SDK executes, it will run the attacker's code with the privileges of the application process. This issue is addressed in version v1.40.0 by using the full absolute path for the command.

## Affected products

- OpenTelemetry OpenTelemetry Go SDK v1.20.0 - v1.39.0

## Identifiers

- CVE-2026-24051
- GHSA-9h8m-3fm2-qjrq
- GO-2026-4394

## Timeline

- 2026-02-02: disclosed
- 2026-02-02: advisory
- 2026-02-02: patched: Fixed in version v1.40.0

## References

- [https://github.com/open-telemetry/opentelemetry-go/commit/d45961bcda453fcbdb6469c22d6e88a1f9970a53](https://github.com/open-telemetry/opentelemetry-go/commit/d45961bcda453fcbdb6469c22d6e88a1f9970a53)
- [https://github.com/open-telemetry/opentelemetry-go/security/advisories/GHSA-9h8m-3fm2-qjrq](https://github.com/open-telemetry/opentelemetry-go/security/advisories/GHSA-9h8m-3fm2-qjrq)

## Related threats

- [OpenTelemetry-Go attribute truncation bypass with Unicode replacement character](https://junglewise.ai/threats/cve-2026-81869-opentelemetry-go-attribute-truncation-bypass-with-unicode)
- [OpenTelemetry-Go endpoint URL logging in TracerProvider diagnostics](https://junglewise.ai/threats/cve-2026-81870-opentelemetry-go-endpoint-url-logging-in-tracerprovider)
- [OpenTelemetry .NET has potential memory exhaustion via unbounded pooled-list sizing in Jaeger exporter conversion path](https://junglewise.ai/threats/cve-2026-41078-opentelemetry-net-has-potential-memory-exhaustion-via-unbounded)
- [OpenTelemetry dotnet: Excessive memory allocation when parsing OpenTelemetry propagation headers](https://junglewise.ai/threats/cve-2026-40894-opentelemetry-dotnet-excessive-memory-allocation-when-parsing)
- [OpenTelemetry dotnet: Unbounded `grpc-status-details-bin` parsing in OTLP/gRPC retry handling](https://junglewise.ai/threats/cve-2026-40891-opentelemetry-dotnet-unbounded-grpc-status-details-bin-parsing-in)
