CVE-2023-39320: Arbitrary code execution via go.mod toolchain directive in cmd/go

Published Sep 8, 2023
·
Updated

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.

Affected Software

1 affected component
Golang Go>=1.21.0<1.21.1

Remediation

Event History

Sep 8, 2023
CVE Published
04:13 PM
Data Sourced
04:13 PM
DescriptionWeakness

Frequently Asked Questions

1

What is the vulnerability ID for this issue?

The vulnerability ID for this issue is CVE-2023-39320.

2

What is the severity of CVE-2023-39320?

The severity of CVE-2023-39320 is critical with a score of 9.8 out of 10.

3

Which software is affected by CVE-2023-39320?

The software affected by CVE-2023-39320 is Golang Go versions 1.21.0 to 1.21.1.

4

How does CVE-2023-39320 work?

CVE-2023-39320 leverages the go.mod toolchain directive in Go 1.21 to execute scripts and binaries relative to the root of the module.

5

Is there a fix available for CVE-2023-39320?

Yes, a fix for CVE-2023-39320 is available. It is recommended to upgrade Golang Go to a version higher than 1.21.1.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203