Description
Command go env is documented as outputting a shell script containing the Go environment. However, go env doesn't sanitize values, so executing its output as a shell script can cause various bad bahaviors, including executing arbitrary commands or inserting new environment variables. This issue is relatively minor because, in general, if an attacker can set arbitrary environment variables on a system, they have better attack vectors than making "go env" print them out.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Go toolchain | cmd/go | < 1.21.0-0 | 1.21.0-0 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 12 | golang-1.19 | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 24.04 LTS | golang-1.21 | No fix yet | — |
| Ubuntu 22.04 LTS | golang-1.17 | 1.17.13-3ubuntu1.2 | USN-7061-1 |
| Ubuntu 22.04 LTS | golang-1.18 | 1.18.1-1ubuntu1.2 | USN-7109-1 |
| Ubuntu 22.04 LTS | golang-1.20 +1 | No fix yet | — |
| Ubuntu 20.04 LTS | golang-1.13 +3 | No fix yet | — |
| Ubuntu 20.04 LTS | golang-1.18 | 1.18.1-1ubuntu1~20.04.3 | USN-7109-1 |
| Ubuntu 18.04 LTS | golang-1.8 +2 | No fix yet | — |
| Ubuntu 16.04 LTS | golang-1.6 +1 | No fix yet | — |
Show 5 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 14.04 LTS | golang-1.10 | No fix yet | — |
| Ubuntu Pro 22.04 LTS | golang-1.13 | No fix yet | — |
| Ubuntu Pro 20.04 LTS | golang-1.16 | No fix yet | — |
| Ubuntu Pro 18.04 LTS | golang-1.13 +1 | No fix yet | — |
| Ubuntu Pro 18.04 LTS | golang-1.18 | 1.18.1-1ubuntu1~18.04.4+esm1 | USN-7109-1 |
| Ubuntu Pro 16.04 LTS | golang-1.13 | No fix yet | — |
| Ubuntu Pro 16.04 LTS | golang-1.18 | 1.18.1-1ubuntu1~16.04.6+esm1 | USN-7109-1 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | golang | 1.21.0-1 | — |
| Azure Linux 2 (CBL-Mariner) | golang +1 | 1.21.0-1 | — |
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | argo-workflows | 3.6.5-r2 | — |
| Wolfi rolling | go-1.20 | No fix yet | — |
| Wolfi rolling | katib-earlystopping +8 | 0.19.0-r31 | — |
| Wolfi rolling | katib-suggestion-goptuna-compat | 0.19.0-r40 | — |
| Wolfi rolling | newrelic-fluent-bit-output | 2.4.0-r5 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Go | toolchain | < 1.21.0-0 | 1.21.0-0 | GO-2024-2962 |
Advisories 3
- USN-7109-1 golang-1.18 vulnerabilities Ubuntu Security Notices (USN) · Jun 25, 2026
- WID-SEC-2026-1706 Jabra Direct: Mehrere Schwachstellen ermöglichen nicht spezifizierten Angriff BSI CERT-Bund (WID) · May 27, 2026
- USN-7061-1 golang-1.17 vulnerabilities Ubuntu Security Notices (USN) · Apr 27, 2026