# Go 1.26

Go 1.26 發布於 2026-02-10，目前最新修補版為 `go1.26.11`，**仍在支援期**。

## 版本介紹

Go 1.26 在語言上帶來兩個實用的小改進：內建函式 `new` 可以直接接收一個運算式當初始值，泛型型別的約束也能引用自己。工具方面，`go fix` 全面改寫成「現代化工具（modernizer）」，可一鍵把舊寫法升級成新語法與新 API。執行時則把 Green Tea GC 設為預設，GC 開銷預期降低 10–40%，cgo 呼叫也快了約 30%。升級時要注意：多個 `crypto` 函式的 `rand` 參數改為一律忽略、固定使用安全亂數；`go mod init` 預設寫入較舊的 `go` 版本；`net/url.Parse` 會拒絕主機部分含多餘冒號的網址；Go 1.26 是最後支援 macOS 12 的版本。

### 語言變更

- `new` 可以接收運算式，例如 `new(42)` 建立一個值為 42 的 `*int`，詳見 [內建函式](/pkg-builtin)。
- 泛型型別可以在自己的型別參數清單中引用自己，例如 `type Adder[A Adder[A]] interface{ ... }`。

### 工具

- `go fix` 改建在與 `go vet` 相同的分析框架上，內含數十個現代化修正器，並支援 `//go:fix inline` 指令自動遷移 API。
- `go mod init` 用 1.N 版工具鏈時會寫入 `go 1.(N-1).0`，讓新模組相容於仍受支援的舊版本。
- 移除 `cmd/doc` 與 `go tool doc`，請改用行為相同的 `go doc`。
- `pprof` 網頁介面預設改為火焰圖（flame graph）檢視。

### 執行時與效能

- Green Tea GC 成為預設，在新款 amd64 CPU 上還會用向量指令掃描小物件；可用 `GOEXPERIMENT=nogreenteagc` 暫時關閉。
- cgo 呼叫的基本開銷降低約 30%。
- 64 位元平台啟動時會隨機化堆積起始位址，提高記憶體攻擊的難度。
- 實驗性的 goroutine 洩漏剖析（`GOEXPERIMENT=goroutineleakprofile`），可找出永遠無法被喚醒的 goroutine，於 Go 1.27 正式推出。
- 編譯器能在更多情況把切片底層陣列配置在堆疊上。

### 標準庫重點

- `errors.AsType[T]` 是泛型版的 `errors.As`，型別安全且更快，詳見 [錯誤包裝](/errors-wrapping)。
- `log/slog` 新增 `NewMultiHandler`，一筆日誌同時送到多個 handler。
- `bytes.Buffer.Peek` 讀取接下來 n 個位元組但不移動讀取位置。
- `reflect.Type` 新增 `Fields`、`Methods`、`Ins`、`Outs`，以迭代器走訪欄位、方法與參數。
- `testing` 新增 `T.ArtifactDir` 等方法，提供寫出測試產物的目錄；`testing/cryptotest.SetGlobalRandom` 讓加密亂數在測試中可重現。
- 新增 `crypto/hpke`（混合公鑰加密，含後量子方案）；實驗性的 `simd/archsimd`（`GOEXPERIMENT=simd`）與 `runtime/secret`（`GOEXPERIMENT=runtimesecret`）。
- `io.ReadAll` 中間配置更少，通常快約兩倍；`os/signal.NotifyContext` 取消時會附上收到哪個訊號作為原因。

### new 接收運算式

JSON 或 Protocol Buffers 常用指標欄位表示「可有可無」，以前要先宣告變數再取位址：`age := 30; p.Age = &age`。現在 `new(30)` 直接建立指向 30 的指標，一個運算式就能填好選填欄位。`new(T)` 傳型別的舊用法不變。

範例：

```go
package main

import (
	"encoding/json"
	"fmt"
)

type Person struct {
	Name string `json:"name"`
	Age  *int   `json:"age,omitempty"`
}

func main() {
	p := new(42)
	fmt.Println(*p)

	out, _ := json.Marshal(Person{Name: "Amy", Age: new(30)})
	fmt.Println(string(out))
	out, _ = json.Marshal(Person{Name: "Bob"})
	fmt.Println(string(out))
}
```

輸出：

```text
42
{"name":"Amy","age":30}
{"name":"Bob"}
```

### 自我引用的泛型約束

有時希望型別參數「能和同型別的值做運算」，例如 `Add` 的參數與回傳值都是自己的型別。以前約束不能引用自己，現在可以寫 `Adder[A Adder[A]]`，代表 A 必須有 `Add(A) A` 方法。詳見 [泛型約束](/generics-constraints)。

範例：

```go
package main

import "fmt"

type Adder[A Adder[A]] interface {
	Add(A) A
}

type Money int

func (m Money) Add(o Money) Money { return m + o }

func SumAll[A Adder[A]](first A, rest ...A) A {
	total := first
	for _, v := range rest {
		total = total.Add(v)
	}
	return total
}

func main() {
	fmt.Println(SumAll(Money(10), 20, 30))
}
```

輸出：

```text
60
```

### errors.AsType

`errors.As` 需要先宣告一個目標變數再傳它的指標，傳錯型別要到執行期才 panic。`errors.AsType[*fs.PathError](err)` 直接回傳轉好的值與是否成功，型別錯誤在編譯期就會被抓到。

範例：

```go
package main

import (
	"errors"
	"fmt"
	"io/fs"
	"os"
)

func main() {
	_, err := os.Open("/definitely/missing.txt")
	if pe, ok := errors.AsType[*fs.PathError](err); ok {
		fmt.Println(pe.Op, pe.Path)
		fmt.Println(errors.Is(pe.Err, fs.ErrNotExist))
	}
}
```

輸出：

```text
open /definitely/missing.txt
true
```

### slog.NewMultiHandler

正式環境常需要「終端機印給人看的文字格式，同時寫一份 JSON 給日誌系統」。`NewMultiHandler` 把多個 handler 組合成一個，每筆日誌都會送給每個 handler。範例一個寫到標準輸出、一個寫到記憶體緩衝區，再把緩衝區內容印出。

範例：

```go
package main

import (
	"bytes"
	"fmt"
	"log/slog"
	"os"
)

func main() {
	noTime := func(groups []string, a slog.Attr) slog.Attr {
		if a.Key == slog.TimeKey && len(groups) == 0 {
			return slog.Attr{}
		}
		return a
	}
	var buf bytes.Buffer
	logger := slog.New(slog.NewMultiHandler(
		slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{ReplaceAttr: noTime}),
		slog.NewJSONHandler(&buf, &slog.HandlerOptions{ReplaceAttr: noTime}),
	))
	logger.Info("started", "port", 8080)
	fmt.Print("json: ", buf.String())
}
```

輸出：

```text
level=INFO msg=started port=8080
json: {"level":"INFO","msg":"started","port":8080}
```

## 本版新增的棄用 API

以下 API 從 Go 1.26 起標記為棄用（Deprecated），新程式不要再使用；說明欄為官方原文。

| 套件 | 符號 | 官方說明 |
| --- | --- | --- |
| `crypto/ecdsa` | `PrivateKey.D` | modifying the raw value can produce invalid keys, and may invalidate internal optimizations; moreover, [big.Int] methods are not suitable for operating on cryptographic values. To encode and decode PrivateKey values, use [PrivateKey.Bytes] and [ParseRawPrivateKey] or [crypto/x509.MarshalPKCS8PrivateKey] and [crypto/x509.ParsePKCS8PrivateKey]. For ECDH, use [crypto/ecdh]. |
| `crypto/ecdsa` | `PublicKey.X` | modifying the raw coordinates can produce invalid keys, and may invalidate internal optimizations; moreover, [big.Int] methods are not suitable for operating on cryptographic values. To encode and decode PublicKey values, use [PublicKey.Bytes] and [ParseUncompressedPublicKey] or [crypto/x509.MarshalPKIXPublicKey] and [crypto/x509.ParsePKIXPublicKey]. For ECDH, use [crypto/ecdh]. For lower-level elliptic curve operations, use a third-party module like filippo.io/nistec. |
| `crypto/ecdsa` | `PublicKey.Y` | modifying the raw coordinates can produce invalid keys, and may invalidate internal optimizations; moreover, [big.Int] methods are not suitable for operating on cryptographic values. To encode and decode PublicKey values, use [PublicKey.Bytes] and [ParseUncompressedPublicKey] or [crypto/x509.MarshalPKIXPublicKey] and [crypto/x509.ParsePKIXPublicKey]. For ECDH, use [crypto/ecdh]. For lower-level elliptic curve operations, use a third-party module like filippo.io/nistec. |
| `crypto/rsa` | `DecryptPKCS1v15` | PKCS #1 v1.5 encryption is dangerous and should not be used. Whether this function returns an error or not discloses secret information. If an attacker can cause this function to run repeatedly and learn whether each instance returned an error then they can decrypt and forge signatures as if they had the private key. See [draft-irtf-cfrg-rsa-guidance-05] for more information. Use [EncryptOAEP] and [DecryptOAEP] instead. |
| `crypto/rsa` | `DecryptPKCS1v15SessionKey` | PKCS #1 v1.5 encryption is dangerous and should not be used. The protections implemented by this function are limited and fragile, as explained above. See [draft-irtf-cfrg-rsa-guidance-05] for more information. Use [EncryptOAEP] and [DecryptOAEP] instead. |
| `crypto/rsa` | `EncryptPKCS1v15` | PKCS #1 v1.5 encryption is dangerous and should not be used. See [draft-irtf-cfrg-rsa-guidance-05] for more information. Use [EncryptOAEP] and [DecryptOAEP] instead. |
| `crypto/rsa` | `PKCS1v15DecryptOptions` | PKCS #1 v1.5 encryption is dangerous and should not be used. See [draft-irtf-cfrg-rsa-guidance-05] for more information. Use [EncryptOAEP] and [DecryptOAEP] instead. |
| `net/http/httputil` | `ReverseProxy.Director` | Use Rewrite instead. |

## 修補版本

| 版本 | 發布日期 | 含安全修補 | 內容（官方原文） |
| --- | --- | --- | --- |
| `go1.26.1` | 2026-03-05 | 是 | includes security fixes to the crypto/x509, html/template, net/url, and os packages, as well as bug fixes to the go command, the go fix command, the compiler, and the os and reflect packages. |
| `go1.26.2` | 2026-04-07 | 是 | includes security fixes to the go command, the compiler, and the archive/tar, crypto/tls, crypto/x509, html/template, and os packages, as well as bug fixes to the go command, the go fix command, the compiler, the linker, the runtime, and the net, net/http, and net/url packages. |
| `go1.26.3` | 2026-05-07 | 是 | includes security fixes to the go command, the pack tool, and the html/template, net, net/http, net/http/httputil, net/mail, and syscall packages, as well as bug fixes to the go command, the go fix command, the compiler, the linker, the runtime, and the crypto/fips140, crypto/tls, go/types, and os packages. |
| `go1.26.4` | 2026-06-02 | 是 | includes security fixes to the crypto/x509, mime, and net/textproto packages, as well as bug fixes to the compiler, the runtime, the go fix command, and the crypto/fips140 package. |
| `go1.26.5` | 2026-07-07 | 是 | includes security fixes to the crypto/tls and os packages, as well as bug fixes to the compiler, the runtime, the go command, and the net, os, and syscall packages. |
| `go1.26.6` | 2026-08-13 | 是 | includes security fixes to the go command, and the crypto/tls, encoding/asn1, encoding/xml, html/template, net, net/http, and net/url packages, as well as bug fixes to the compiler, the linker, the runtime, and the crypto/tls and os packages. |
| `go1.26.7` | 2026-08-19 | 否 | includes fixes to the net/http package. |
| `go1.26.8` | 2026-09-01 | 否 | includes fixes to cgo, the compiler, the runtime, and the debug/elf and os packages. |
| `go1.26.9` | 2026-10-08 | 是 | includes security fixes to the go command, and the crypto/tls, html/template, net/http, net/textproto, and os packages, as well as bug fixes to the compiler, the linker, the runtime, vet, and the crypto/mlkem, net/http, and os packages. |
| `go1.26.10` | 2026-10-19 | 是 | includes security fixes to the crypto/x509 package. |
| `go1.26.11` | 2026-11-10 | 是 | includes security fixes to cgo, the go command, the compiler, the linker, and the net/http package, as well as bug fixes to the assembler, the compiler, the runtime, toolchain bootstrapping, and the crypto/fips140, crypto/hkdf, crypto/rsa, crypto/tls, net, and net/http packages. |

## 已知漏洞

在 Go 1.26 系列修補版中修正的漏洞共 75 個；仍影響最新修補版 `go1.26.11` 的漏洞共 0 個。

### 本系列已修正

| 編號 | CVE | 摘要（官方原文） | 修正於 |
| --- | --- | --- | --- |
| [GO-2026-6859](https://pkg.go.dev/vuln/GO-2026-6859) | CVE-2026-97054 | HTTP/1 server crash due to MaxBytesReader header race in net/http | go1.26.11、go1.27.4 |
| [GO-2026-6858](https://pkg.go.dev/vuln/GO-2026-6858) | CVE-2026-97033 | Unexpected code execution via --sysroot, -target, -isysroot, -Wl,-syslibroot, and -x cgo flags in cmd/go | go1.26.11、go1.27.4 |
| [GO-2026-6857](https://pkg.go.dev/vuln/GO-2026-6857) | CVE-2026-97034 | Arbitrary command execution via GCC spec files in cgo linker search directories in cmd/go | go1.26.11、go1.27.4 |
| [GO-2026-6856](https://pkg.go.dev/vuln/GO-2026-6856) | CVE-2026-97035 | Unexpected code execution and arbitrary file write via Clang -gen-* and GCC -gnat* flags in cgo in cmd/go | go1.26.11、go1.27.4 |
| [GO-2026-6855](https://pkg.go.dev/vuln/GO-2026-6855) | CVE-2026-97036 | Arbitrary code execution during build on darwin via "-l to_library" in cgo in cmd/go | go1.26.11、go1.27.4 |
| [GO-2026-6854](https://pkg.go.dev/vuln/GO-2026-6854) | CVE-2026-97037 | Linker script injection via split -Wl, flags and Darwin or symbol linker flags in cgo in cmd/go | go1.26.11、go1.27.4 |
| [GO-2026-6853](https://pkg.go.dev/vuln/GO-2026-6853) | CVE-2026-97038 | Arbitrary code execution via crafted .syso files and cgo linker input files in cmd/go | go1.26.11、go1.27.4 |
| [GO-2026-6852](https://pkg.go.dev/vuln/GO-2026-6852) | CVE-2026-97039 | Flag sanitization bypass via "#cgo pkg-config:" directives in cmd/go | go1.26.11、go1.27.4 |
| [GO-2026-6851](https://pkg.go.dev/vuln/GO-2026-6851) | CVE-2026-97040 | Cgo directive injection via .syso files disguised as Go object files in cmd/go and cmd/link | go1.26.11、go1.27.4 |
| [GO-2026-6850](https://pkg.go.dev/vuln/GO-2026-6850) | CVE-2026-97041 | Host linker flag injection via //go:cgo_* directives in cmd/compile and cmd/link | go1.26.11、go1.27.4 |
| [GO-2026-6849](https://pkg.go.dev/vuln/GO-2026-6849) | CVE-2026-97042 | Linker flag injection via cgo_import_dynamic and PE DLL names in cmd/cgo, cmd/compile, and cmd/link | go1.26.11、go1.27.4 |
| [GO-2026-6848](https://pkg.go.dev/vuln/GO-2026-6848) | CVE-2026-97043 | Unexpected code execution via escaped quotes in //go:cgo_ldflag in cmd/go and cmd/compile | go1.26.11、go1.27.4 |
| [GO-2026-6809](https://pkg.go.dev/vuln/GO-2026-6809) | CVE-2026-111943 | Distrust compromised intermediate certificates in crypto/x509 | go1.26.10、go1.27.3 |
| [GO-2026-6617](https://pkg.go.dev/vuln/GO-2026-6617) | CVE-2026-97032 | HTTP/2 server crash due to HPACK encoder race in net/http | go1.26.9、go1.27.2 |
| [GO-2026-6617](https://pkg.go.dev/vuln/GO-2026-6617) | CVE-2026-97032 | HTTP/2 server crash due to HPACK encoder race in net/http | go1.26.9、go1.27.2 |
| [GO-2026-6613](https://pkg.go.dev/vuln/GO-2026-6613) | CVE-2026-94439 | HTTP/1 server connection desynchronization after 2xx CONNECT response in net/http | go1.26.9、go1.27.2 |
| [GO-2026-6612](https://pkg.go.dev/vuln/GO-2026-6612) | CVE-2026-78663 | Double flow control refund on HTTP/2 server streams in net/http | go1.26.9、go1.27.2 |
| [GO-2026-6612](https://pkg.go.dev/vuln/GO-2026-6612) | CVE-2026-78663 | Double flow control refund on HTTP/2 server streams in net/http | go1.26.9、go1.27.2 |
| [GO-2026-6611](https://pkg.go.dev/vuln/GO-2026-6611) | CVE-2026-78669 | Excessive CPU consumption from repeated initial window changes in net/http | go1.26.9、go1.27.2 |
| [GO-2026-6611](https://pkg.go.dev/vuln/GO-2026-6611) | CVE-2026-78669 | Excessive CPU consumption from repeated initial window changes in net/http | go1.26.9、go1.27.2 |
| [GO-2026-6610](https://pkg.go.dev/vuln/GO-2026-6610) | CVE-2026-78660 | HTTP/2 transport accepts malformed framing-related headers in net/http | go1.26.9、go1.27.2 |
| [GO-2026-6610](https://pkg.go.dev/vuln/GO-2026-6610) | CVE-2026-78660 | HTTP/2 transport accepts malformed framing-related headers in net/http | go1.26.9、go1.27.2 |
| [GO-2026-6609](https://pkg.go.dev/vuln/GO-2026-6609) | CVE-2026-78667 | Lack of limit on size of parsed Range headers in net/http | go1.26.9、go1.27.2 |
| [GO-2026-6608](https://pkg.go.dev/vuln/GO-2026-6608) | CVE-2026-94440 | Memory limit bypass when parsing MIME headers in net/textproto, mime/multipart | go1.26.9、go1.27.2 |
| [GO-2026-6607](https://pkg.go.dev/vuln/GO-2026-6607) | CVE-2026-97031 | Reject malformed ECH outer extension references in crypto/tls | go1.26.9、go1.27.2 |
| [GO-2026-6605](https://pkg.go.dev/vuln/GO-2026-6605) | CVE-2026-56866 | HTTP/1 client connection desynchronization after CONNECT rejection in net/http | go1.26.9、go1.27.2 |
| [GO-2026-6604](https://pkg.go.dev/vuln/GO-2026-6604) | CVE-2026-56857 | Root.Mkdir(All) can follow junctions out of the root on Windows in os | go1.26.9、go1.27.2 |
| [GO-2026-6603](https://pkg.go.dev/vuln/GO-2026-6603) | CVE-2026-78659 | HTTP/2 server memory exhaustion due to Trailer headers in net/http | go1.26.9、go1.27.2 |
| [GO-2026-6603](https://pkg.go.dev/vuln/GO-2026-6603) | CVE-2026-78659 | HTTP/2 server memory exhaustion due to Trailer headers in net/http | go1.26.9、go1.27.2 |
| [GO-2026-6602](https://pkg.go.dev/vuln/GO-2026-6602) | CVE-2026-94447 | Checksum database bypass for golang.org/toolchain in cmd/go | go1.26.9、go1.27.2 |
| [GO-2026-6601](https://pkg.go.dev/vuln/GO-2026-6601) | CVE-2026-94444 | Checksum bypass for golang.org/fips140 in cmd/go | go1.26.9、go1.27.2 |
| [GO-2026-6600](https://pkg.go.dev/vuln/GO-2026-6600) | CVE-2026-97030 | Recognize yield as regexp preceder keyword in html/template | go1.26.9、go1.27.2 |
| [GO-2026-6599](https://pkg.go.dev/vuln/GO-2026-6599) | CVE-2026-94448 | Reset context tracking on consecutive template expressions in html/template | go1.26.9、go1.27.2 |
| [GO-2026-6218](https://pkg.go.dev/vuln/GO-2026-6218) | CVE-2026-56860 | Avoid quadratic complexity in resolvePath in net/url | go1.25.13、go1.26.6、go1.27.0-rc.3 |
| [GO-2026-6180](https://pkg.go.dev/vuln/GO-2026-6180) | CVE-2026-56864 | Ignore unrelated, unauthenticated hashes in Lookup in golang.org/x/mod/sumdb | go1.25.13、go1.26.6、go1.27.0-rc.3 |
| [GO-2026-6179](https://pkg.go.dev/vuln/GO-2026-6179) | CVE-2026-56865 | Fix transparency log tile verification bypass in golang.org/x/mod/sumdb/tlog | go1.25.13、go1.26.6、go1.27.0-rc.3 |
| [GO-2026-6091](https://pkg.go.dev/vuln/GO-2026-6091) | CVE-2026-56858 | Fix Javascript regexp context tracking in html/template | go1.25.13、go1.26.6、go1.27.0-rc.3 |
| [GO-2026-6090](https://pkg.go.dev/vuln/GO-2026-6090) | CVE-2026-56862 | Limit handshake messages we are willing to accept post-handshake in crypto/tls | go1.25.13、go1.26.6、go1.27.0-rc.3 |
| [GO-2026-6089](https://pkg.go.dev/vuln/GO-2026-6089) | CVE-2026-56853 | Apply ReadHeaderTimeout when doing unencrypted HTTP/2 check in net/http | go1.25.13、go1.26.6、go1.27.0-rc.3 |
| [GO-2026-6088](https://pkg.go.dev/vuln/GO-2026-6088) | CVE-2026-56859 | Add recursion depth guard during decode in encoding/xml | go1.25.13、go1.26.6、go1.27.0-rc.3 |
| [GO-2026-5972](https://pkg.go.dev/vuln/GO-2026-5972) | CVE-2026-33818 | Enforce maximum recursion depth in encoding/asn1 | go1.25.13、go1.26.6、go1.27.0-rc.3 |
| [GO-2026-5942](https://pkg.go.dev/vuln/GO-2026-5942) | CVE-2026-46600 | Parsing an invalid SVCB or HTTPS RR can panic in golang.org/x/net/dns/dnsmessage | go1.26.6、go1.27.0-rc.3 |
| [GO-2026-5856](https://pkg.go.dev/vuln/GO-2026-5856) | CVE-2026-42505 | Invoking Encrypted Client Hello privacy leak in crypto/tls | go1.25.12、go1.26.5、go1.27.0-rc.2 |
| [GO-2026-5039](https://pkg.go.dev/vuln/GO-2026-5039) | CVE-2026-42507 | Arbitrary inputs are included in errors without any escaping in net/textproto | go1.25.11、go1.26.4 |
| [GO-2026-5038](https://pkg.go.dev/vuln/GO-2026-5038) | CVE-2026-42504 | Quadratic complexity in WordDecoder.DecodeHeader in mime | go1.25.11、go1.26.4 |
| [GO-2026-5037](https://pkg.go.dev/vuln/GO-2026-5037) | CVE-2026-27145 | Inefficient candidate hostname parsing in crypto/x509 | go1.25.11、go1.26.4 |
| [GO-2026-5026](https://pkg.go.dev/vuln/GO-2026-5026) | CVE-2026-39821 | Invoking failure to reject ASCII-only Punycode-encoded labels in golang.org/x/net/idna | go1.25.13、go1.26.6、go1.27.0-rc.3 |
| [GO-2026-4986](https://pkg.go.dev/vuln/GO-2026-4986) | CVE-2026-39820 | Quadratic string concatentation in consumeComment in net/mail | go1.25.10、go1.26.3 |
| [GO-2026-4984](https://pkg.go.dev/vuln/GO-2026-4984) | CVE-2026-42501 | Malicious module proxy can bypass checksum database in cmd/go | go1.25.10、go1.26.3 |
| [GO-2026-4982](https://pkg.go.dev/vuln/GO-2026-4982) | CVE-2026-39823 | Bypass of meta content URL escaping causes XSS in html/template | go1.25.10、go1.26.3 |
| [GO-2026-4981](https://pkg.go.dev/vuln/GO-2026-4981) | CVE-2026-33811 | Crash when handling long CNAME response in net | go1.25.10、go1.26.3 |
| [GO-2026-4980](https://pkg.go.dev/vuln/GO-2026-4980) | CVE-2026-39826 | Escaper bypass leads to XSS in html/template | go1.25.10、go1.26.3 |
| [GO-2026-4979](https://pkg.go.dev/vuln/GO-2026-4979) | CVE-2026-39817 | Invoking "go tool pack" does not sanitize output paths in cmd/go | go1.25.10、go1.26.3 |
| [GO-2026-4978](https://pkg.go.dev/vuln/GO-2026-4978) | CVE-2026-39819 | Invoking "go bug" follows symlinks in predictable temporary filenames in cmd/go | go1.25.10、go1.26.3 |
| [GO-2026-4977](https://pkg.go.dev/vuln/GO-2026-4977) | CVE-2026-42499 | Quadratic string concatenation in consumePhrase in net/mail | go1.25.10、go1.26.3 |
| [GO-2026-4976](https://pkg.go.dev/vuln/GO-2026-4976) | CVE-2026-39825 | ReverseProxy forwards queries with more than urlmaxqueryparams parameters in net/http/httputil | go1.25.10、go1.26.3 |
| [GO-2026-4971](https://pkg.go.dev/vuln/GO-2026-4971) | CVE-2026-39836 | Panic in Dial and LookupPort when handling NUL byte on Windows in net | go1.25.10、go1.26.3 |
| [GO-2026-4970](https://pkg.go.dev/vuln/GO-2026-4970) | CVE-2026-39822 | Root escape via symlink plus trailing slash in os | go1.25.12、go1.26.5、go1.27.0-rc.2 |
| [GO-2026-4947](https://pkg.go.dev/vuln/GO-2026-4947) | CVE-2026-32280 | Unexpected work during chain building in crypto/x509 | go1.25.9、go1.26.2 |
| [GO-2026-4946](https://pkg.go.dev/vuln/GO-2026-4946) | CVE-2026-32281 | Inefficient policy validation in crypto/x509 | go1.25.9、go1.26.2 |
| [GO-2026-4918](https://pkg.go.dev/vuln/GO-2026-4918) | CVE-2026-33814 | Infinite loop in HTTP/2 transport when given bad SETTINGS_MAX_FRAME_SIZE in net/http/internal/http2 in golang.org/x/net | go1.25.10、go1.26.3 |
| [GO-2026-4871](https://pkg.go.dev/vuln/GO-2026-4871) | CVE-2026-27140 | Code execution vulnerability in SWIG code generation in cmd/go | go1.25.9、go1.26.2 |
| [GO-2026-4870](https://pkg.go.dev/vuln/GO-2026-4870) | CVE-2026-32283 | Unauthenticated TLS 1.3 KeyUpdate record can cause persistent connection retention and DoS in crypto/tls | go1.25.9、go1.26.2 |
| [GO-2026-4869](https://pkg.go.dev/vuln/GO-2026-4869) | CVE-2026-32288 | Unbounded allocation for old GNU sparse in archive/tar | go1.25.9、go1.26.2 |
| [GO-2026-4868](https://pkg.go.dev/vuln/GO-2026-4868) | CVE-2026-27143 | Missing bound checks can lead to memory corruption in safe Go in cmd/compile | go1.25.9、go1.26.2 |
| [GO-2026-4867](https://pkg.go.dev/vuln/GO-2026-4867) | CVE-2026-27144 | Miscompilation allows memory corruption via CONVNOP-wrapped array copy in cmd/compile | go1.25.9、go1.26.2 |
| [GO-2026-4866](https://pkg.go.dev/vuln/GO-2026-4866) | CVE-2026-33810 | Case-sensitive excludedSubtrees name constraints cause Auth Bypass in crypto/x509 | go1.26.2 |
| [GO-2026-4865](https://pkg.go.dev/vuln/GO-2026-4865) | CVE-2026-32289 | JsBraceDepth Context Tracking Bugs (XSS) in html/template | go1.25.9、go1.26.2 |
| [GO-2026-4864](https://pkg.go.dev/vuln/GO-2026-4864) | CVE-2026-32282 | TOCTOU permits root escape on Linux via Root.Chmod in os in internal/syscall/unix | go1.25.9、go1.26.2 |
| [GO-2026-4603](https://pkg.go.dev/vuln/GO-2026-4603) | CVE-2026-27142 | URLs in meta content attribute actions are not escaped in html/template | go1.25.8、go1.26.1 |
| [GO-2026-4602](https://pkg.go.dev/vuln/GO-2026-4602) | CVE-2026-27139 | FileInfo can escape from a Root in os | go1.25.8、go1.26.1 |
| [GO-2026-4601](https://pkg.go.dev/vuln/GO-2026-4601) | CVE-2026-25679 | Incorrect parsing of IPv6 host literals in net/url | go1.25.8、go1.26.1 |
| [GO-2026-4600](https://pkg.go.dev/vuln/GO-2026-4600) | CVE-2026-27138 | Panic in name constraint checking for malformed certificates in crypto/x509 | go1.26.1 |
| [GO-2026-4599](https://pkg.go.dev/vuln/GO-2026-4599) | CVE-2026-27137 | Incorrect enforcement of email constraints in crypto/x509 | go1.26.1 |
| [GO-2026-4337](https://pkg.go.dev/vuln/GO-2026-4337) | CVE-2025-68121 | Unexpected session resumption in crypto/tls | go1.24.13、go1.25.7、go1.26.0-rc.3 |



## 資料來源

- [Go 1.26 Release Notes](https://go.dev/doc/go1.26)
- [Go 發版歷史](https://go.dev/doc/devel/release#go1.26.0)
- [Go 漏洞資料庫](https://vuln.go.dev)
- [golang/go 原始碼 go1.26.0](https://github.com/golang/go/tree/go1.26.0)
