Skip to content

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

OpenTelemetry Go SDK Vulnerable to Arbitrary Code Execution via PATH Hijacking

High Go
Severity
7.0 / 10
High · CVSS 3.1
Exploit chance (EPSS)
0.18%
Chance of exploitation in the next 30 days. Higher than 7.11% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-426 Untrusted Search Path
Fix
1.40.0
Upgrade go.opentelemetry.io/otel/sdk to this version or later

Description

Impact

The OpenTelemetry Go SDK in version v1.20.0-1.39.0 is vulnerable to Path Hijacking (Untrusted Search Paths) on macOS/Darwin systems. The resource detection code in sdk/resource/host_id.go executes the ioreg 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 has been patched in d45961b, which was released with v1.40.0.

References

Affected versions

Go

PackageVulnerableFixed in
go.opentelemetry.io/otel/sdk
>= 1.21.0, < 1.40.0
1.40.0
go.opentelemetry.io/otel/sdk
>= 1.21.0, < 1.40.0
1.40.0

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

go.opentelemetry.io/otel/sdk Go → 1.40.0

go
go get go.opentelemetry.io/otel/sdk@v1.40.0 && go mod tidy

Severity breakdown

CVSS 3.1 7.0

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Attack vector
Local
Attack complexity
High
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Weakness

CWE-426: Untrusted Search Path

The product searches for critical resources using an externally-supplied search path that can point to resources that are not under the product's direct control.

How to prevent it
  • Architecture and Design, Implementation: Hard-code the search path to a set of known-safe values (such as system directories), or only allow them to be specified by the administrator in a configuration file. Do not allow these settings to be modified by an external party. Be careful to avoid related weaknesses such as CWE-426 and CWE-428.
  • Implementation: When invoking other programs, specify those programs using fully-qualified pathnames. While this is an effective approach, code that uses fully-qualified pathnames might not be portable to other systems that do not use the same pathnames. The portability can be improved by locating the full-qualified paths in a centralized, easily-modifiable location within the source code, and having the code refer to these paths.
  • Implementation: Remove or restrict all environment settings before invoking other programs. This includes the PATH environment variable, LD_LIBRARY_PATH, and other settings that identify the location of code libraries, and any application-specific search paths.
  • Implementation: Check your search path before use and remove any elements that are likely to be unsafe, such as the current working directory or a temporary files directory.
  • Implementation: Use other functions that require explicit paths. Making use of any of the other readily available functions that require explicit paths is a safe way to avoid this problem. For example, system() in C does not require a full path since the shell can take care of it, while execl() and execv() require a full path.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-p9f8-wvj8-2fg8
OpenTelemetry-Go: UTF-8 replacement rune bypasses attribute length truncation
Medium Also affects go.opentelemetry.io/otel/sdk
GHSA-8wmf-6v46-5gfg
OpenTelemetry-Go: Exporter config logging may leak endpoint URLs in info logs
Low Also affects go.opentelemetry.io/otel/sdk
GHSA-hfvc-g4fc-pqhx
opentelemetry-go: BSD kenv command not using absolute path enables PATH hijacking
High Also affects go.opentelemetry.io/otel/sdk
GHSA-6hwm-xvph-95vm
NLTK: Uncontrolled search path when invoking the Graphviz 'dot' binary
High Same weakness, CWE-426
GHSA-hxmv-c4g6-5fqc
PraisonAI workflow include bypasses tools.py autoload opt-in and executes included recipe code
High Same weakness, CWE-426
GHSA-rx78-29qr-5hq8
OpenClaw: Workspace-derived service PATH could influence trash command selection
High Same weakness, CWE-426
GHSA-wc84-j36w-pw4x
OpenClaw: Workspace .env STATE_DIRECTORY could influence bundled runtime dependency roots
High Same weakness, CWE-426
GHSA-24vr-rprv-67rf
OpenClaw: Workspace .env npm_execpath could influence bundled runtime dependency install
High Same weakness, CWE-426

Credits: MorielHarush, arminru, pellared

Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor