Skip to content
OpenAdvisories

Package · Go

stdlib

182 known vulnerabilities.

182 results · Feed

  • High 7.5

    Case-sensitive excludedSubtrees name constraints cause Auth Bypass in crypto/x509

    When verifying a certificate chain containing excluded DNS constraints, these constraints are not correctly applied to wildcard DNS SANs which use a different case than the constraint. This only affects validation of otherwise trusted certificate chains, issu…

  • Medium 6.1

    JsBraceDepth Context Tracking Bugs (XSS) in html/template

    Context was not properly tracked across template branches for JS template literals, leading to possibly incorrect escaping of content when branches were used. Additionally template actions within JS template literals did not properly track the brace depth, le…

  • Medium 6.4

    TOCTOU permits root escape on Linux via Root.Chmod in os in internal/syscall/unix

    On Linux, if the target of Root.Chmod is replaced with a symlink while the chmod operation is in progress, Chmod can operate on the target of the symlink, even when the target lies outside the root. The Linux fchmodat syscall silently ignores the AT_SYMLINK_N…

  • Medium 5.9

    Panic in name constraint checking for malformed certificates in crypto/x509

    Certificate verification can panic when a certificate in the chain has an empty DNS name and another certificate in the chain has excluded name constraints. This can crash programs that are either directly verifying X.509 certificate chains, or those that use…

  • Low 2.5

    FileInfo can escape from a Root in os

    On Unix platforms, when listing the contents of a directory using File.ReadDir or File.Readdir the returned FileInfo could reference a file outside of the Root in which the File was opened. The impact of this escape is limited to reading metadata provided by …

  • Medium 6.1

    URLs in meta content attribute actions are not escaped in html/template

    Actions which insert URLs into the content attribute of HTML meta tags are not escaped. This can allow XSS if the meta tag also has an http-equiv attribute with the value "refresh". A new GODEBUG setting has been added, htmlmetacontenturlescape, which can be …

  • High 7.5

    Incorrect parsing of IPv6 host literals in net/url

    url.Parse insufficiently validated the host/authority component and accepted some invalid URLs.

  • High 7.5

    Incorrect enforcement of email constraints in crypto/x509

    When verifying a certificate chain which contains a certificate containing multiple email address constraints which share common local portions but different domain portions, these constraints will not be properly applied, and only the last constraint will be…

  • Critical 9.1

    Unexpected session resumption in crypto/tls

    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 ca…

  • Low 3.8

    Improper access to parent directory of root in os

    It was possible to improperly access the parent directory of an os.Root by opening a filename ending in "../". For example, Root.Open("../") would open the parent directory of the Root. This escape only permits opening the parent directory itself, not ancesto…

  • High 7.5

    Memory exhaustion in query parameter parsing in net/url

    The net/url package does not set a limit on the number of query parameters in a query. While the maximum size of query parameters in URLs is generally limited by the maximum request header size, the net/http.Request.ParseForm method can parse large URL-encode…

  • Medium 6.5

    Excessive CPU consumption when building archive index in archive/zip

    archive/zip uses a super-linear file name indexing algorithm that is invoked the first time a file in an archive is opened. This can lead to a denial of service when consuming a maliciously constructed ZIP archive.

  • Medium 5.3

    Handshake messages may be processed at the incorrect encryption level in crypto/tls

    During the TLS 1.3 handshake if multiple messages are sent in records that span encryption level boundaries (for instance the Client Hello and Encrypted Extensions messages), the subsequent messages may be processed before the encryption level changes. This c…

  • Medium 6.5

    Improper application of excluded DNS name constraints when verifying wildcard names in crypto/x509

    An excluded subdomain constraint in a certificate chain does not restrict the usage of wildcard SANs in the leaf certificate. For example a constraint that excludes the subdomain test.example.com does not prevent a leaf certificate from claiming the SAN *.exa…

  • High 7.5

    Excessive resource consumption when printing error string for host certificate validation in crypto/x509

    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 certi…

  • Medium 5.3

    Excessive CPU consumption in Reader.ReadResponse in net/textproto

    The Reader.ReadResponse function constructs a response string through repeated string concatenation of lines. When the number of lines in a response is large, this can cause excessive CPU consumption.

  • Medium 4.3

    Unbounded allocation when parsing GNU sparse map in archive/tar

    tar.Reader does not set a maximum size on the number of sparse region data blocks in GNU tar pax 1.0 sparse files. A maliciously-crafted archive containing a large number of sparse regions can cause a Reader to read an unbounded amount of data from the archiv…

  • High 7.5

    Panic when validating certificates with DSA public keys in crypto/x509

    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.

  • High 7.5

    Quadratic complexity when parsing some invalid inputs in encoding/pem

    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.

  • Medium 5.3

    Parsing DER payload can cause memory exhaustion in encoding/asn1

    Parsing a maliciously crafted DER payload could allocate large amounts of memory, causing memory exhaustion.

  • Medium 5.3

    Lack of limit when parsing cookies can cause memory exhaustion in net/http

    Despite HTTP headers having a default limit of 1MB, the number of cookies that can be parsed does not have a limit. By sending a lot of very small cookies such as "a=;", an attacker can make an HTTP server allocate a large amount of structs, causing large mem…

  • Medium 5.3

    Insufficient validation of bracketed IPv6 hostnames in net/url

    The Parse function permits values other than IPv6 addresses to be included in square brackets within the host component of a URL. RFC 3986 permits IPv6 addresses to be included within the host component, enclosed within square brackets. For example: "http://[…

  • High 7.5

    Excessive CPU consumption in ParseAddress in net/mail

    The ParseAddress function constructs domain-literal address components through repeated string concatenation. When parsing large domain-literal components, this can cause excessive CPU consumption.

  • High 7.5

    Quadratic complexity when checking name constraints in crypto/x509

    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.

  • Medium 5.3

    ALPN negotiation error contains attacker controlled information in crypto/tls

    When Conn.Handshake fails during ALPN negotiation the error contains attacker controlled information (the ALPN protocols sent by the client) which is not escaped.

  • Medium 5.4

    CrossOriginProtection insecure bypass patterns not limited to exact matches in net/http

    When using http.CrossOriginProtection, the AddInsecureBypassPattern method can unexpectedly bypass more requests than intended. CrossOriginProtection then skips validation, but forwards the original request path, which may be served by a different handler wit…

  • Medium 6.5

    Unexpected paths returned from LookPath in os/exec

    If the PATH environment variable contains paths which are executables (rather than just directories), passing certain strings to LookPath ("", ".", and ".."), can result in the binaries listed in the PATH being unexpectedly returned.

  • High 7.0

    Incorrect results returned from Rows.Scan in database/sql

    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…

  • Medium 5.5

    Inconsistent handling of O_CREATE|O_EXCL on Unix and Windows in os in syscall

    os.OpenFile(path, os.O_CREATE|O_EXCL) behaved differently on Unix and Windows systems when the target path was a dangling symlink. On Unix systems, OpenFile with O_CREATE and O_EXCL flags never follows symlinks. On Windows, when the target path was a symlink …

  • Medium 6.8

    Sensitive headers not cleared on cross-origin redirect in net/http

    Proxy-Authorization and Proxy-Authenticate headers persisted on cross-origin redirects potentially leaking sensitive information.

  • High 7.5

    Usage of ExtKeyUsageAny disables policy validation in crypto/x509

    Calling Verify with a VerifyOptions.KeyUsages that contains ExtKeyUsageAny unintentionally disabledpolicy validation. This only affected certificate chains which contain policy graphs, which are rather uncommon.

  • Critical 9.1

    Request smuggling due to acceptance of invalid chunked data in net/http

    The net/http package improperly accepts a bare LF as a line terminator in chunked data chunk-size lines. This can permit request smuggling if a net/http server is used in conjunction with a server that incorrectly accepts a bare LF as part of a chunk-ext.

  • Medium 4.4
    CVE-2025-22870 Public exploit

    HTTP Proxy bypass using IPv6 Zone IDs in golang.org/x/net

    Matching of hosts against proxy patterns can improperly treat an IPv6 zone ID as a hostname component. For example, when the NO_PROXY environment variable is set to "*.example.com", a request to "[::1%25.example.com]:80` will incorrectly match and not be prox…

  • Medium 4.0

    Timing sidechannel for P-256 on ppc64le in crypto/internal/nistec

    Due to the usage of a variable time instruction in the assembly implementation of an internal function, a small number of bits of secret scalars are leaked on the ppc64le architecture. Due to the way this function is used, we do not believe this leakage is en…

  • High 7.5

    ParsePKCS1PrivateKey panic with partial keys in crypto/x509

    Using ParsePKCS1PrivateKey to parse a RSA key that is missing the CRT values would panic when verifying that the key is well formed.

  • Medium 6.1

    Sensitive headers incorrectly sent after cross-domain redirect in net/http

    The HTTP client drops sensitive headers after following a cross-domain redirect. For example, a request to a.com/ containing an Authorization header which is redirected to b.com/ will not send that header to b.com. In the event that the client received a subs…

  • Medium 6.1

    Usage of IPv6 zone IDs can bypass URI name constraints in crypto/x509

    A certificate with a URI which has a IPv6 address with a zone ID may incorrectly satisfy a URI name constraint that applies to the certificate chain. Certificates containing URIs are not permitted in the web PKI, so this only affects users of private PKIs whi…

  • High 7.5

    Stack exhaustion in Parse in go/build/constraint

    Calling Parse on a "// +build" build tag line with deeply nested expressions can cause a panic due to stack exhaustion.

  • Medium 4.3

    Stack exhaustion in all Parse functions in go/parser

    Calling any of the Parse functions on Go source code which contains deeply nested literals can cause a panic due to stack exhaustion.

  • High 7.5

    Stack exhaustion in Decoder.Decode in encoding/gob

    Calling Decoder.Decode on a message which contains deeply nested structures can cause a panic due to stack exhaustion. This is a follow-up to CVE-2022-30635.