CVE-2023-39320

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

CRITICAL 9.8

At a glance

Source
NVD
EPSS
EPSS 1.76 % · percentile 78 ()
State
PUBLISHED
Published
Updated
Assigner
Go
NVD status
Modified

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.

Weaknesses (CWE)

  • CWE-94 — Code Injection

References

Scores

VersionScoreVectorScored by
CVSS 3.1CRITICAL 9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HNVD · nvd@nist.gov (Primary)

Advisories

European references

CERT-FR advisories

Affected configurations (NVD CPE)

Affected products

ProductVersions
Go toolchain · cmd/goaffected 1.21.0-0 < 1.21.1

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD