Security mailing lists by PureSourceCode

CVE-2023-39320

CRITICAL 9.8CVSS 3.1

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

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.

Published
8 Sep 2023
Last modified
17 Jun 2026
Assigned by
security@golang.org
NVD status
Modified
Weakness
CWE-94
Also known as
BIT-golang-2023-39320GO-2023-2042
Sources
NVDJSONOSV GO-2023-2042JSON

Scores

SourceScored byVersionScoreVector / decision
NVD nvd@nist.gov (Primary) CVSS 3.1 CRITICAL 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD golang go
cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*
>= 1.21.0, < 1.21.1 1.21.1
OSV Go toolchain >= 1.21.0-0, < 1.21.1 1.21.1

References

History

  • 25 Nov 2026 20:36 UTC · NVD: first stored (published 8 Sep 2023)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 7 Sep 2023)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.