Skip to main content
Menu
Advisories

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

GHSA-QRWW-3XMV-QHGMPublished Updated GitHub

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/open-telemetry/opentelemetry-js/commit/28e3484c711d65c90ebd36d81a61fe1d04647b62 and released in version 3.1.1. And for the v2.x maintenance branch, this was fixed in github.com/open-telemetry/opentelemetry-js/commit/55398d41c4e2174ab7fa40ed4cc3a3d2d44b337f and released in version 2.12.1.

References

Affected versions

References

GitHub · open-telemetry/opentelemetry-js