CVE-2023-45285
NixOS vulnerability analysis and mitigation

Overview

CVE-2023-45285 is a security vulnerability in the Go programming language's module fetching functionality. The issue affects the go get command when fetching modules with a '.git' suffix, where it may unexpectedly fallback to the insecure 'git://' protocol if the module is unavailable via secure protocols (https:// and git+ssh://), even when GOINSECURE is not set. This vulnerability affects Go versions before 1.20.12 and from 1.21.0-0 before 1.21.5, specifically impacting users who are not using the module proxy and are fetching modules directly with GOPROXY=off (NVD, Go Dev).

Technical details

The vulnerability occurs in the Go command's VCS (Version Control System) handling mechanism. When processing a module path with a .git suffix, the system should try secure protocols (https:// and git+ssh://) before falling back to any insecure protocols. However, the implementation incorrectly falls back to the insecure git:// protocol even when GOINSECURE is not set for the module. The vulnerability has been assigned a CVSS v3.1 base score of 7.5 (HIGH) with vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N (NVD).

Impact

The vulnerability could allow an attacker to intercept module fetching requests when users attempt to download Go modules with .git suffixes. This creates a potential for man-in-the-middle attacks as the insecure git:// protocol does not provide encryption or authentication. The impact is particularly significant for users who have GOPROXY=off configured and are fetching modules directly from version control systems (Golang Dev).

Mitigation and workarounds

The vulnerability has been fixed in Go versions 1.20.12 and 1.21.5. Users are strongly recommended to upgrade to these or later versions. As a workaround, users can ensure they're using the Go module proxy (default behavior) instead of direct module fetching, or carefully verify the authenticity of modules being fetched when direct fetching is required (Golang Dev).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
David EstlickCISO
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
Adam FletcherChief Security Officer
“We know that if Wiz identifies something as critical, it actually is.”
Greg PoniatowskiHead of Threat and Vulnerability Management