Proposals Unofficial Go proposal tracker

Deprecate and remove execabs in favor of os/exec

#64047 · x/sys/execabs · low impact · Accepted ·

The x/sys/execabs package was added in 2021 to fix a security issue. Without it, os/exec could run a program found in the current directory when looking up a command name in PATH. Since Go 1.19, os/exec refuses such relative path lookups by default, so execabs is no longer needed.

The package will be marked deprecated, and its functions will get //go:fix directives so tools can automatically rewrite calls to use os/exec. Eventually, x/sys/execabs will be removed.

// Before
import "golang.org/x/sys/execabs"
cmd := execabs.Command("git", "status")

// After
import "os/exec"
cmd := exec.Command("git", "status")
Proposal
#64047 by rolandshoemaker
Status
Accepted on Oct 7, 2026
Impact
low
Area
x/sys/execabs