Summary @opentelemetry/resources in versions <=2.12.0, >=3.0.0 <=3.1.0 is vulnerable to Path Hijacking (Untrusted Search Paths) on macOS/Darwin and BSD systems
Description
@opentelemetry/resources in versions <=2.12.0, >=3.0.0 <=3.1.0 is vulnerable to Path Hijacking (Untrusted Search Paths) on macOS/Darwin and BSD systems. The resource detection code in "packages/opentelemetry-resources/src/detectors/platform/node/machine-id/getMachineId-darwin.ts" executes the ioreg system command using a search path and in "packages/opentelemetry-resources/src/detectors/platform/node/machine-id/getMachineId-bsd.ts" executes the kenv system command using a search path. An attacker with the ability to locally modify the PATH environment variable can achieve Arbitrary Code Execution (ACE) within the context of the application.
Patches
This was fixed in github.com/3.1.1. And for the v2.x maintenance branch, this was fixed in github.com/2.12.1.
References
- github.com/
open-telemetry/ opentelemetry-js/ security/ advisories/ GHSA-qrww-3xmv-qhgm - github.com/
open-telemetry/ opentelemetry-js/ commit/ 28e3484c711d65c90ebd36d81a61fe1d04647b62 - GHSA-9h8m-3fm2-qjrq / CVE-2026-24051 Go, ioreg
- GHSA-hfvc-g4fc-pqhx / CVE-2026-39883 Go, kenv
- GHSA-v8pv-4842-x354 / CVE-2026-81192 .NET contrib