Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: go.mod toolchain directive allows arbitrary execution (CVE-2023-39320) #1144

Closed
eks-distro-pr-bot opened this issue Sep 6, 2023 · 1 comment · Fixed by #1154
Closed

Comments

@eks-distro-pr-bot
Copy link
Contributor

The go.mod toolchain directive, introduced in Go 1.21, could 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.

Thanks to Juho Nurminen of Mattermost for reporting this issue.

This is CVE-2023-39320 and Go issue https://go.dev/issue/62198.


This is a PRIVATE issue for CVE-2023-39320, tracked in http://b/296227674 and fixed by http://tg/1996318.

/cc @golang/security and @golang/release

@rcrozean
Copy link
Member

rcrozean commented Sep 6, 2023

Mentioned in the upstream backport issue (golang/go#62393 (comment)) and in the issue description, this was introduced and only applies Go 1.21. Fixed in: #1154

@rcrozean rcrozean closed this as completed Sep 7, 2023
@rcrozean rcrozean linked a pull request Sep 7, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants