# GHSA-QRWW-3XMV-QHGM: 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

- Database: GitHub
- Severity: CVSS 7.0 (High)
- Published: 2026-11-09
- Modified: 2026-11-09

## Affected versions

- @opentelemetry/resources (npm): from 1.10.0, through 2.12.0
- @opentelemetry/resources (npm): from 3.0.0, through 3.1.0

## Description

### 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. 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 https://github.com/open-telemetry/opentelemetry-js/commit/28e3484c711d65c90ebd36d81a61fe1d04647b62 and released in version `3.1.1`.
And for the v2.x maintenance branch, this was fixed in https://github.com/open-telemetry/opentelemetry-js/commit/55398d41c4e2174ab7fa40ed4cc3a3d2d44b337f and released in version `2.12.1`.

### References

- https://github.com/open-telemetry/opentelemetry-js/security/advisories/GHSA-qrww-3xmv-qhgm
- https://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

## References

- https://github.com/open-telemetry/opentelemetry-js/security/advisories/GHSA-qrww-3xmv-qhgm

Page: https://cve.now/GHSA-QRWW-3XMV-QHGM

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
