CVE-2023-39320

Arbitrary code execution via go.mod toolchain directive in cmd/go

Published Sep 8, 2023 CVSS 3.1 · 9.8 Critical EPSS 1.8% KEV · Not listed
Description
The go.mod toolchain directive, introduced in Go 1.21, can be leveraged to execute scripts and binaries relative to the root of the module when the "go" command was executed within the module. This applies to modules downloaded using the "go" command from the module proxy, as well as modules downloaded directly using VCS software.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2023-43052 The go.mod toolchain directive, introduced in Go 1.21, can be leveraged to execute scripts and binaries relative to the root of the module when the "go" command was executed within the module. This applies to modules downloaded using the "go" command from the module proxy, as well as modules downloaded directly using VCS software.
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
Go
Published
Updated
Feb 13, 2025, 5:02 PM
Reserved
Jul 27, 2023, 5:05 PM
Status
Modified
Published
Sep 8, 2023, 5:15 PM
Modified
Jun 17, 2026, 6:12 AM
Severity
Important
Public date
Sep 6, 2023, 12:00 AM