CVE-2026-39883: opentelemetry-go: BSD kenv command not using absolute path enables PATH hijacking
Summary The fix for GHSA-9h8m-3fm2-qjrq (CVE-2026-24051) changed the Darwin ioreg command to use an absolute path but left the BSD kenv command using a bare name, allowing the same PATH hijacking attack on BSD and Solaris platforms. Root Cause sdk/resource/hostid.go line 42: if result, err := r.execCommand("kenv", "-q", "smbios.system.uuid");
Published Apr 8, 2026 · Updated Apr 9, 2026
Affected packages
go.opentelemetry.io/otel/sdk
- Ecosystem
- Go
- Affected
- >= 1.15.0, <= 1.42.0
- Fixed in
- 1.43.0
- Check
go list -m go.opentelemetry.io/otel/sdk
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
The fix for GHSA-9h8m-3fm2-qjrq (CVE-2026-24051) changed the Darwin ioreg command to use an absolute path but left the BSD kenv command using a bare name, allowing the same PATH hijacking attack on BSD and Solaris platforms.
Root Cause
sdk/resource/host_id.go line 42:
if result, err := r.execCommand("kenv", "-q", "smbios.system.uuid"); err == nil {
Compare with the fixed Darwin path at line 58:
result, err := r.execCommand("/usr/sbin/ioreg", "-rd1", "-c", "IOPlatformExpertDevice")
The execCommand helper at sdk/resource/host_id_exec.go uses exec.Command(name, arg...) which searches $PATH when the command name contains no path separator.
Affected platforms (per build tag in host_id_bsd.go:4): DragonFly BSD, FreeBSD, NetBSD, OpenBSD, Solaris.
The kenv path is reached when /etc/hostid does not exist (line 38-40), which is common on FreeBSD systems.
Attack
- Attacker has local access to a system running a Go application that imports
go.opentelemetry.io/otel/sdk - Attacker places a malicious
kenvbinary earlier in$PATH - Application initializes OpenTelemetry resource detection at startup
hostIDReaderBSD.read()callsexec.Command("kenv", ...)which resolves to the malicious binary- Arbitrary code executes in the context of the application
Same attack vector and impact as CVE-2026-24051.
Suggested Fix
Use the absolute path:
if result, err := r.execCommand("/bin/kenv", "-q", "smbios.system.uuid"); err == nil {
On FreeBSD, kenv is located at /bin/kenv.
Credited to kodareef5, dmathieu.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesCVE-2026-128085
opentelemetry-go: AttributeValueLengthLimit is fully bypassed by attribute values composed of valid U+FFFD runes
medium5.3Nov 13, 2026CVE-2026-81869
OpenTelemetry-Go: UTF-8 replacement rune bypasses attribute length truncation
medium5.1Sep 29, 2026CVE-2026-81870
OpenTelemetry-Go: Exporter config logging may leak endpoint URLs in info logs
low2.0Sep 17, 2026CVE-2026-24051
OpenTelemetry Go SDK Vulnerable to Arbitrary Code Execution via PATH Hijacking
high7.0Feb 2, 2026
