Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 916494 (CVE-2023-29406, CVE-2023-29409, CVE-2023-39318, CVE-2023-39319, CVE-2023-39320, CVE-2023-39321, CVE-2023-39322, CVE-2023-39323) - <dev-lang/go-{1.20.10,1.21.3}: multiple vulnerabilities
Summary: <dev-lang/go-{1.20.10,1.21.3}: multiple vulnerabilities
Alias: CVE-2023-29406, CVE-2023-29409, CVE-2023-39318, CVE-2023-39319, CVE-2023-39320, CVE-2023-39321, CVE-2023-39322, CVE-2023-39323
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Security
Whiteboard: A3 [glsa+]
Depends on: 915900
  Show dependency tree
Reported: 2023-10-29 18:46 UTC by John Helmert III
Modified: 2024-04-05 10:58 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2023-10-29 18:46:04 UTC
CVE-2023-29406 (

The HTTP/1 client does not fully validate the contents of the Host header. A maliciously crafted Host header can inject additional headers or entire requests. With fix, the HTTP/1 client now refuses to send requests containing an invalid Request.Host or Request.URL.Host value.

Fixed in 1.19.11, 1.20.6.

CVE-2023-29409 (

Extremely large RSA keys in certificate chains can cause a client/server to expend significant CPU time verifying signatures. With fix, the size of RSA keys transmitted during handshakes is restricted to <= 8192 bits. Based on a survey of publicly trusted RSA keys, there are currently only three certificates in circulation with keys larger than this, and all three appear to be test certificates that are not actively deployed. It is possible there are larger keys in use in private PKIs, but we target the web PKI, so causing breakage here in the interests of increasing the default safety of users of crypto/tls seems reasonable.

Fixed in 1.19.12, 1.20.7.

CVE-2023-39320 (

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 module proxy, as well as modules downloaded directly using VCS software.

CVE-2023-39318 (

The html/template package does not properly handle HTML-like "" comment tokens, nor hashbang "#!" comment tokens, in <script> contexts. This may cause the template parser to improperly interpret the contents of <script> contexts, causing actions to be improperly escaped. This may be leveraged to perform an XSS attack.

CVE-2023-39319 (

The html/template package does not apply the proper rules for handling occurrences of "<script", "<!--", and "</script" within JS literals in <script> contexts. This may cause the template parser to improperly consider script contexts to be terminated early, causing actions to be improperly escaped. This could be leveraged to perform an XSS attack.

CVE-2023-39321 (

Processing an incomplete post-handshake message for a QUIC connection can cause a panic.

CVE-2023-39322 (

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 size.

CVE-2023-39318, CVE-2023-39319, CVE-2023-39320, CVE-2023-39321, and
CVE-2023-39322 are fixed in 1.20.8 and 1.21.1.

CVE-2023-39323 (

Line directives ("//line") can be used to bypass the restrictions on "//go:cgo_" directives, allowing blocked linker and compiler flags to be passed during compilation. This can result in unexpected execution of arbitrary code when running "go build". The line directive requires the absolute path of the file in which the directive lives, which makes exploiting this issue significantly more complex.

Fixed in 1.20.9 and 1.21.2.
Comment 1 Larry the Git Cow gentoo-dev 2023-11-25 08:57:33 UTC
The bug has been referenced in the following commit(s):

commit 7f1e599c82e7f7f6b21bf1127d01d7dfa903e21c
Author:     GLSAMaker <>
AuthorDate: 2023-11-25 08:56:49 +0000
Commit:     Hans de Graaff <>
CommitDate: 2023-11-25 08:57:21 +0000

    [ GLSA 202311-09 ] Go: Multiple Vulnerabilities
    Signed-off-by: GLSAMaker <>
    Signed-off-by: Hans de Graaff <>

 glsa-202311-09.xml | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)