Go vulnerabilities
We track 62 vulnerabilities in Go products across 6 products. 62 are rated high or critical, and 2 have been exploited in real attacks. The most recent was published on September 2, 2026.
Latest Go vulnerabilities
- 7.5 High severity
golang.org/x/crypto/ssh: Allocation of Resources Without Limits or Throttling
Previously, a channel registered in the mux's chanList is not usable until it is established. A malicious peer was able flood the channel's incomingRequests, deadlocking the entire connection. Now, we add an atomic established state, set when a channel becomes
- 7.5 High severity
golang.org/x/crypto/ssh: Allocation of Resources Without Limits or Throttling
Previously, after a channel has been established, a malicious peer could send crafted messages that would deadlock the entire connection. Now, we handle all RFC 4254 channel messages; global requests are handled explicitly. Then, treat all other messages as a
- 7.8 High severity
os: UNIX Symbolic Link (Symlink) Following
On Unix systems, opening a file in an os.Root improperly follows symlinks to locations outside of the Root when the final path component of the a path is a symbolic link and the path ends in /. For example, 'root.Open("symlink/")' will open "symlink" even when
- 7.5 High severity
Traefik: Uncontrolled Resource Consumption
Traefik before 2.10.5 and 3.0.0-beta4 is affected by a denial-of-service vulnerability in HTTP/2 request handling inherited from the Go standard library's HTTP/2 implementation (CVE-2023-44487 / CVE-2023-39325, the 'Rapid Reset' technique). A remote attacker c
- 7.1 High severity
golang.org/x/crypto/ssh: Incorrect Authorization
Previously, CVE-2024-45337 fixed an authorization bypass for misused ssh server configurations; if any other type of callback is passed other than public key, then the source-address validation would be skipped.
- 7.4 High severity
golang.org/x/crypto/ssh/knownhosts: Improper Certificate Validation
Previously, a revoked 'SignatureKey' belonging to a CA was not correctly checked for revocation. Now, both the 'key' and 'key.SignatureKey' are checked for @revoked.
- 9.1 Critical severity
golang.org/x/crypto/ssh: Integer Overflow or Wraparound
When writing data larger than 4GB in a single Write call on an SSH channel, an integer overflow in the internal payload size calculation caused the write loop to spin indefinitely, sending empty packets without making progress. The size comparison now uses int
- 9.1 Critical severity
golang.org/x/crypto/ssh/agent: Missing Authorization
The in-memory keyring returned by NewKeyring() silently accepted keys with the ConfirmBeforeUse constraint but never enforced it. The key would sign without any confirmation prompt, with no indication to the caller that the constraint was not in effect. NewKey
- 8.7 High severity
golang.org/x/crypto/ssh/agent: Deserialization of Untrusted Data
When adding a key to a remote agent constraint extensions such as [email protected] were not serialized in the request. Destination restrictions were silently stripped when forwarding keys, allowing unrestricted use of the key on the remote
- 9.1 Critical severity
golang.org/x/crypto/ssh: Missing Authorization
The Verify() method for FIDO/U2F security key types ([email protected], [email protected]) did not check the User Presence flag. Signatures generated without physical touch were accepted, allowing unattended use of a hardware security
- 7.5 High severity
cmd/go: Improper Verification of Cryptographic Signature
A malicious module proxy can exploit a flaw in the go command's validation of module checksums to bypass checksum database validation. This vulnerability affects any user using an untrusted module proxy (GOMODPROXY) or checksum database (GOSUMDB). A malicious
- 8.8 High severity
golang.org/x/tools/gopls: Binding to an Unrestricted IP Address
gopls by default communicates via pipe. However, -port and -listen flags are supported as means of debugging. If -listen is given a value without an explicit host (e.g. :8080), or -port is used, gopls will listen on 0.0.0.0. As a result, users might inadverten
- 7.5 High severity
crypto/x509: Improper Certificate Validation
Validating certificate chains which use policies is unexpectedly inefficient when certificates in the chain contain a very large number of policy mappings, possibly causing denial of service. This only affects validation of otherwise trusted certificate chains
- 7.1 High severity
cmd/compile: Access of Resource Using Incompatible Type
The compiler is meant to unwrap pointers which are the operands of a memory move; a no-op interface conversion prevented the compiler from making the correct determination about non-overlapping moves, potentially leading to memory corruption at runtime.
- 8.8 High severity
cmd/go: Incorrect Authorization
SWIG file names containing 'cgo' and well-crafted payloads could lead to code smuggling and arbitrary code execution at build time due to trust layer bypass.
- 10.0 Critical severity
crypto/tls: Improper Certificate Validation
During session resumption in crypto/tls, if the underlying Config has its ClientCAs or RootCAs fields mutated between the initial handshake and the resumed handshake, the resumed handshake may succeed when it should have failed. This may happen when a user cal
- 7.0 High severity
cmd/go: Out-of-bounds Write
Downloading and building modules with malicious version strings can cause local code execution. On systems with Mercurial (hg) installed, downloading modules from non-standard sources (e.g., custom domains) can cause unexpected code execution due to how extern
- 8.6 High severity
cmd/go: Improper Neutralization of Argument Delimiters in a Command
Building a malicious file with cmd/go can cause can cause a write to an attacker-controlled file with partial control of the file content. The "#cgo pkg-config:" directive in a Go source file provides command-line arguments to provide to the Go pkg-config comm
- 7.5 High severity
crypto/x509: Improper Certificate Validation
Within HostnameError.Error(), when constructing an error string, there is no limit to the number of hosts that will be printed out. Furthermore, the error string is constructed by repeated string concatenation, leading to quadratic runtime. Therefore, a certif
- 7.5 High severity
encoding/pem: Allocation of Resources Without Limits or Throttling
The processing time for parsing some invalid inputs scales non-linearly with respect to the size of the input. This affects programs which parse untrusted PEM inputs.
- 7.5 High severity
crypto/x509: Improper Certificate Validation
Validating certificate chains which contain DSA public keys can cause programs to panic, due to a interface cast that assumes they implement the Equal method. This affects programs which validate arbitrary certificate chains.
- 7.5 High severity
crypto/x509: Inefficient Algorithmic Complexity
Due to the design of the name constraint checking algorithm, the processing time of some inputs scale non-linearly with respect to the size of the certificate. This affects programs which validate arbitrary certificate chains.
- 7.0 High severity
database/sql: Concurrent Execution using Shared Resource with Improper Synchronization
Cancelling a query (e.g. by cancelling the context passed to one of the query methods) during a call to the Scan method of the returned Rows can result in unexpected results if other queries are being made in parallel. This can result in a race condition that
- 8.6 High severity
cmd/go: External Control of File Name or Path
The go command may execute unexpected commands when operating in untrusted VCS repositories. This occurs when possibly dangerous VCS configuration is present in repositories. This can happen when a repository was fetched via one VCS (e.g. Git), but contains me
- 7.5 High severity
crypto/tls: Observable Discrepancy
Before Go 1.20, the RSA based TLS key exchanges used the math/big library, which is not constant time. RSA blinding was applied to prevent timing attacks, but analysis shows this may not have been fully effective. In particular it appears as if the removal of
- 7.5 High severity
path/filepath: Improper Limitation of a Pathname to a Restricted Directory
The filepath package does not recognize paths with a \??\ prefix as special. On Windows, a path beginning with \??\ is a Root Local Device path equivalent to a path beginning with \\?\. Paths with a \??\ prefix may be used to access arbitrary locations on the
- 7.5 High severity
net/http: Allocation of Resources Without Limits or Throttling
A malicious HTTP/2 client which rapidly creates requests and immediately resets them can cause excessive server resource consumption. While the total number of requests is bounded by the http2.Server.MaxConcurrentStreams setting, resetting an in-progress reque
- 7.5 High severity
HTTP/2 Rapid Reset Attack Exploited
The HTTP/2 protocol allows a denial of service (server resource consumption) because request cancellation can reset many streams quickly, as exploited in the wild in August through October 2023.
- 7.5 High severity
crypto/tls: Allocation of Resources Without Limits or Throttling
QUIC connections do not set an upper bound on the amount of data buffered when reading post-handshake messages, allowing a malicious QUIC connection to cause unbounded memory growth. With fix, connections now consistently reject messages larger than 65KiB in s
- 9.8 Critical severity
cmd/go: Improper Control of Generation of Code
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
- 9.8 Critical severity
cmd/go: Improper Neutralization of Special Elements in Output Used by a Downstream Component
The go command may execute arbitrary code at build time when using cgo. This may occur when running "go get" on a malicious module, or when running any other command which builds untrusted code. This is can by triggered by linker flags, specified via a "#cgo L
- 9.8 Critical severity
cmd/go: Improper Control of Generation of Code
The go command may execute arbitrary code at build time when using cgo. This may occur when running "go get" on a malicious module, or when running any other command which builds untrusted code. This is can by triggered by linker flags, specified via a "#cgo L
- 7.8 High severity
runtime: Exposure of Resource to Wrong Sphere
On Unix platforms, the Go runtime does not behave differently when a binary is run with the setuid/setgid bits. This can be dangerous in certain cases, such as when dumping memory state, or assuming the status of standard i/o file descriptors. If a setuid/setg
- 9.8 Critical severity
cmd/go: Improper Control of Generation of Code
The go command may generate unexpected code at build time when using cgo. This may result in unexpected behavior when running a go program which uses cgo. This may occur when running an untrusted module which contains directories with newline characters in the
- 7.3 High severity
html/template: Improper Neutralization of Special Elements in Output Used by a Downstream Component
Templates containing actions in unquoted HTML attributes (e.g. "attr={{.}}") executed with empty input can result in output with unexpected results when parsed due to HTML normalization rules. This may allow injection of arbitrary attributes into tags.
- 9.8 Critical severity
html/template: Improper Neutralization of Special Elements used in a Command
Not all valid JavaScript whitespace characters are considered to be whitespace. Templates containing whitespace characters outside of the character set "\t\n\f\r\u0020\u2028\u2029" in JavaScript contexts that also contain actions may not be properly sanitized
- 7.3 High severity
html/template: Improper Neutralization of Special Elements in Output Used by a Downstream Component
Angle brackets (<>) are not considered dangerous characters when inserted into CSS contexts. Templates containing multiple actions separated by a '/' character can result in unexpectedly closing the CSS context and allowing for injection of unexpected HTML, if
- 9.8 Critical severity
html/template: Improper Control of Generation of Code
Templates do not properly consider backticks (`) as Javascript string delimiters, and do not escape them as expected. Backticks are used, since ES6, for JS template literals. If a template contains a Go template action within a Javascript template literal, the
- 7.5 High severity
go/scanner: Integer Overflow or Wraparound
Calling any of the Parse functions on Go source code which contains //line directives with very large line numbers can cause an infinite loop due to integer overflow.
- 7.5 High severity
mime/multipart: Allocation of Resources Without Limits or Throttling
Multipart form parsing can consume large amounts of CPU and memory when processing form inputs containing very large numbers of parts. This stems from several causes: 1. mime/multipart.Reader.ReadForm limits the total memory a parsed multipart form can consume