CVE-2026-39883: opentelemetry-go BSD Kenv Command Not Using Vulnerability

HIGH
Advisory Identifier: GHSA-hfvc-g4fc-pqhx
CWE-426
Published
Advisory Summary

CVE-2026-39883 is a HIGH bsd kenv command not using vulnerability (CWE-426: Untrusted Search Path) affecting opentelemetry-go libraries in the Go ecosystem. The issue involves bsd kenv command not using absolute path enables path hijacking. Remediation is available by upgrading affected packages to version 1.43.0.

CVE-2026-39883 at a Glance

CVE Identifier CVE-2026-39883
GHSA Identifier GHSA-hfvc-g4fc-pqhx
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-426: Untrusted Search Path
Affected Product opentelemetry-go
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2026-39883

To remediate this vulnerability, upgrade all affected opentelemetry-go dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

go.opentelemetry.io/otel/sdk fixed: 1.43.0
Upgrade go.opentelemetry.io/otel/sdk to 1.43.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for go.opentelemetry.io/otel/sdk

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-39883, inspect your project dependencies for opentelemetry-go:

inspect dependencies for go.opentelemetry.io/otel/sdk

Analyze the terminal output to locate any version of opentelemetry-go in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.43.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-426: Untrusted Search Path, where 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. In opentelemetry-go, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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 1. Attacker has local access to a system running a Go application that imports `go.opentelemetry.io/otel/sdk` 2. Attacker places a malicious `kenv` binary earlier in `$PATH` 3. Application initializes OpenTelemetry resource detection at startup 4. `hostIDReaderBSD.read()` calls `exec.Command("kenv", ...)` which resolves to the malicious binary 5. 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`.

CVE-2026-39883 Affected opentelemetry-go Versions

1 component(s)
Fixed Versions:
1.43.0
Product / Package Ecosystem Affected Versions Fixed Version
go.opentelemetry.io/otel/sdk
Go
≥ 1.15.0
< 1.43.0
1.43.0

References

Frequently Asked Questions

What is CVE-2026-39883?
CVE-2026-39883 is a security vulnerability in opentelemetry-go involving BSD kenv command not using absolute path enables PATH hijacking under CWE-426: Untrusted Search Path.
Which opentelemetry-go versions are affected?
Affected versions include releases prior to 1.43.0 across affected packages: go.opentelemetry.io/otel/sdk.
What version fixes CVE-2026-39883?
Upgrading to 1.43.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is go.opentelemetry.io/otel/sdk affected?
Yes, go.opentelemetry.io/otel/sdk is affected in releases prior to 1.43.0. Upgrade your dependency to 1.43.0 or later.
What CWE is associated with CVE-2026-39883?
CVE-2026-39883 is classified under 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 can I check Go dependencies for CVE-2026-39883?
Run the dependency tree command: 'inspect dependencies for go.opentelemetry.io/otel/sdk'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-hfvc-g4fc-pqhx",
  "modified" : "2026-04-09T14:29:41Z",
  "published" : "2026-04-08T19:22:12Z",
  "aliases" : [ "CVE-2026-39883" ],
  "summary" : "opentelemetry-go: BSD kenv command not using absolute path enables PATH hijacking",
  "details" : "## Summary\n\nThe 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.\n\n## Root Cause\n\n`sdk/resource/host_id.go` line 42:\n\n    if result, err := r.execCommand(\"kenv\", \"-q\", \"smbios.system.uuid\"); err == nil {\n\nCompare with the fixed Darwin path at line 58:\n\n    result, err := r.execCommand(\"/usr/sbin/ioreg\", \"-rd1\", \"-c\", \"IOPlatformExpertDevice\")\n\nThe `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.\n\nAffected platforms (per build tag in `host_id_bsd.go:4`): DragonFly BSD, FreeBSD, NetBSD, OpenBSD, Solaris.\n\nThe `kenv` path is reached when `/etc/hostid` does not exist (line 38-40), which is common on FreeBSD systems.\n\n## Attack\n\n1. Attacker has local access to a system running a Go application that imports `go.opentelemetry.io/otel/sdk`\n2. Attacker places a malicious `kenv` binary earlier in `$PATH`\n3. Application initializes OpenTelemetry resource detection at startup\n4. `hostIDReaderBSD.read()` calls `exec.Command(\"kenv\", ...)` which resolves to the malicious binary\n5. Arbitrary code executes in the context of the application\n\nSame attack vector and impact as CVE-2026-24051.\n\n## Suggested Fix\n\nUse the absolute path:\n\n    if result, err := r.execCommand(\"/bin/kenv\", \"-q\", \"smbios.system.uuid\"); err == nil {\n\nOn FreeBSD, `kenv` is located at `/bin/kenv`.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "go.opentelemetry.io/otel/sdk"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.15.0"
      }, {
        "fixed" : "1.43.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.42.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/open-telemetry/opentelemetry-go/security/advisories/GHSA-hfvc-g4fc-pqhx"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-39883"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/open-telemetry/opentelemetry-go"
  }, {
    "type" : "WEB",
    "url" : "http://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.43.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-426" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-08T19:22:12Z",
    "nvd_published_at" : "2026-04-08T21:17:00Z"
  }
}