Go Updates & Release Notes
81 updates curated from 98 sources by the Releasebot Team. Last updated: Nov 11, 2026
- Nov 11, 2026
- Date parsed from source:Nov 11, 2026
- First seen by Releasebot:Nov 11, 2026
Go 1.27.4 and Go 1.26.11
Go releases minor updates with 12 security fixes, strengthening HTTP server stability and protecting cgo builds from code execution, unsafe linker inputs, and flag injection.
Hello gophers,
We have just released Go versions 1.27.4 and 1.26.11, minor point releases.
These releases include 12 security fixes following the security policy:
net/http: HTTP/1 server crash due to MaxBytesReader header race
For HTTP/1 servers, when MaxBytesReader's limit is exceeded, "Connection: close" header is automatically set without synchronization, which might race with another header being set explicitly in the server handler. As a result, an HTTP/1 server that utilizes MaxBytesReader or MaxBytesHandler can crash due to runtime panic if its handler reads the request body concurrently with writing the response header.
Thanks to Jakub Ciolek (https://ciolek.dev) for reporting this issue.
This is CVE-2026-97054 and Go issue https://go.dev/issue/82563.
cmd/go: unexpected code execution via --sysroot, -target, -isysroot, -Wl,-syslibroot, and -x cgo flags
Building a malicious package that uses cgo could cause arbitrary code execution at build time through several compiler and linker flags permitted in "#cgo" directives.
Specifically, "--sysroot" in GCC and Clang relocates compiler subprograms, spec files, and CRT startup objects to an attacker-controlled directory; "-target" in Clang falls back to executing target helper tools from the current working directory when not found in PATH; "-isysroot" and "-Wl,-syslibroot" can pass a regular file on disk to GNU ld.bfd, which interprets it as a positional linker script; and "-x" permitted specifying arbitrary compiler input languages beyond those supported by cgo.
"--sysroot" and "-target" are now disallowed in "#cgo" flags, "-isysroot" and "-Wl,-syslibroot" are verified not to point to regular files, and "-x" is restricted to the C, C++, Objective-C, and assembler languages supported by cgo.
This issue was found by the Go Security Team during an internal audit.
This is CVE-2026-97033 and Go issue https://go.dev/issue/82577.
cmd/go: arbitrary command execution via GCC spec files in cgo linker search directories
When using GCC, building a malicious package that uses cgo could cause arbitrary command execution at link time via untrusted GCC spec files ("specs" or "*.spec").
When linking with "-fopenmp", "-fopenacc", or "-fsanitize=" in "#cgo LDFLAGS", GCC's built-in link spec evaluates "%:include(libgomp.spec)" or "%:include(libsanitizer.spec)" and searches for spec files in "-L" and sysroot directories (including subdirectories and multilib sibling directories such as "../lib64"), as well as the working directory when "-fopenmp" or "-fopenacc" is used or when "-fsanitize=" is combined with "-static" or "-static-lib*".
The go command now rejects "-L", "-isysroot", and "-Wl,-syslibroot" directories (and the working and package directories when applicable) that contain GCC spec files, and disallows "@" and "-" prefixes in "-fsanitize=" compiler flag values.
This issue was found by the Go Security Team during an internal audit.
This is CVE-2026-97034 and Go issue https://go.dev/issue/82576.
cmd/go: unexpected code execution and arbitrary file write via Clang -gen-* and GCC -gnat* flags in cgo
When using Clang or GCC, building a malicious package that uses cgo could cause unexpected code execution at build time or write files to arbitrary directories via "-gen-" or "-gnat" flags in "#cgo" directives.
The "-g*" wildcard in the compiler and linker flag allowlists previously matched Clang's two-argument "-gen-cdb-fragment-path " flag and GCC's two-argument "-gnatO " flag, permitting compilation database fragments and sidecar output files to be written to arbitrary directories and desynchronizing flag argument parsing between the go command and the compiler driver so that subsequent arguments could be passed as unvalidated positional inputs to the linker.
"-gen-" and "-gnat" flags are now disallowed in "#cgo" compiler and linker flags.
This issue was found by the Go Security Team during an internal audit.
This is CVE-2026-97035 and Go issue https://go.dev/issue/82575.
cmd/go: arbitrary code execution during build on darwin via "-l to_library" in cgo
On Darwin, building a malicious package that uses cgo could cause arbitrary code execution when using the Apple linker due to passing "-l to_library " in a "#cgo LDFLAGS" directive.
The Apple linker recombines the separated arguments "-l" and "to_library" into "-lto_library", which loads an arbitrary LTO plugin dynamic library at link time.
The go command now disallows "-l" followed by "to_library" in "#cgo LDFLAGS", rejects "-lazy_library", "-lazy_framework", "-load_hidden", "-library", and "-library-path", and checks recombined "-l" arguments against disallowed linker flags and patterns.
Thanks to Ali Sherif (https://www.linkedin.com/in/ali-sherif-13812b276/) for reporting this issue.
This is CVE-2026-97036 and Go issue https://go.dev/issue/82574.
cmd/go: linker script injection via split -Wl, flags and Darwin or symbol linker flags in cgo
Building a malicious package that uses cgo could cause arbitrary code execution at link time by passing linker script files to the host linker via "#cgo LDFLAGS".
Split "-Wl," flags that consume a following argument (such as "-Wl,-rpath", "-Wl,--just-symbols", and "-Wl,-undefined") previously accepted a bare second argument without a "-Wl," prefix, which the compiler driver passes directly to the linker as a positional input file. Additionally, when using GNU ld.bfd, flags such as "-framework", "-Wl,-framework", "-Wl,-undefined", "-Wl,--just-symbols", "-Wl,-R", "-Wl,-subsystem", and (on non-Darwin platforms) "-Wl,-sectcreate" could cause ld.bfd to interpret their arguments as linker scripts if they named a regular file on disk.
The go command now requires a "-Wl," prefix on the second token of split "-Wl," flags (except "-Wl,-R"), verifies that these flags do not reference linker script files, and disallows bare "-Wl,--warn-backrefs-exclude".
This issue was found by the Go Security Team during an internal audit.
This is CVE-2026-97037 and Go issue https://go.dev/issue/82573.
cmd/go: arbitrary code execution via crafted .syso files and cgo linker input files
Building a malicious package containing ".syso" files or cgo linker inputs could inject arbitrary linker flags or execute arbitrary code at link time.
Linker input files—including ".syso" files, direct object or library inputs in "#cgo LDFLAGS", and libraries in "-L" directories—were passed to the external linker without validating their format or checking for embedded linker options. Across platforms, this allowed executing GNU ld implicit linker scripts disguised as libraries or ".syso" files (or loaded via "-l:" or "-l" containing path separators), injecting unallowlisted linker flags via PE/COFF ".drectve" sections on Windows or Mach-O "LC_LINKER_OPTION" load commands on Darwin, or invoking LTO plugins via GCC or LLVM LTO intermediate representation sections in ELF, PE/COFF, or Mach-O objects.
The go command now verifies that ".syso" files, direct linker inputs, and libraries in "-L" directories are valid binary objects or archives that do not contain unallowlisted ".drectve" directives, "LC_LINKER_OPTION" load commands, or LTO IR sections, and disallows "-l:" and ":", "=", or path separators in "-l" flags.
This issue was found by the Go Security Team during an internal audit.
This is CVE-2026-97038 and Go issue https://go.dev/issue/82572.
cmd/go: flag sanitization bypass via "#cgo pkg-config:" directives
Building a malicious package that uses "#cgo pkg-config:" directives could load untrusted pkg-config ".pc" files or inject unvalidated compiler and linker flags.
The pkg-config flag allowlist previously permitted "--with-path=" and "--personality=", allowed "--define-variable=" values beginning with "=" or "$" (which can rewrite paths in system ".pc" files into sysroot-prefixed "-L=" or "-L$SYSROOT" linker search paths), and allowed package arguments ending in ".pc" or containing path separators or "..", which caused pkg-config to load local ".pc" files directly from the package directory. In addition, flags returned by "pkg-config --cflags" in cgoCPPFLAGS were not checked when determining whether internal linking is safe.
The go command now disallows "--with-path=", "--personality=", leading "=" or "$" characters in "--define-variable=" values, and local ".pc" paths in "#cgo pkg-config:" directives, and inspects cgoCPPFLAGS when checking internal linking compatibility.
This issue was found by the Go Security Team during an internal audit.
This is CVE-2026-97039 and Go issue https://go.dev/issue/82571.
cmd/go, cmd/link: cgo directive injection via .syso files disguised as Go object files
Building a package containing a crafted ".syso" file could bypass cgo flag validation and inject arbitrary linker flags when linking.
When loading ".syso" entries from a package archive, the linker only checked for recognized host object headers (ELF, Mach-O, PE, and XCOFF) before falling through to Go object parsing. A ".syso" file beginning with a "go object" header was parsed as a Go compiler object, allowing untrusted cgo metadata directives (such as "cgo_ldflag" or "cgo_dynamic_linker") embedded in the ".syso" file to be passed to the external linker without validation. Additionally, ".syso" filenames longer than 16 bytes lost their ".syso" extension when truncated in archive headers, and unrecognized ".syso" formats forced external linking in pure-Go builds.
The linker now rejects ".syso" files that are not recognized host object formats, and "cmd/go" and "cmd/pack" preserve the ".syso" suffix when truncating long archive member names.
Thanks to RyotaK (https://ryotak.net) of GMO Flatt Security Inc. for reporting this issue.
This is CVE-2026-97040 and Go issue https://go.dev/issue/82570.
cmd/compile, cmd/link: host linker flag injection via //go:cgo_* directives
Building a malicious package containing "//go:cgo_*" compiler directives could inject arbitrary flags into the external linker invocation on ELF platforms.
The compiler and linker did not reject commas in "//go:cgo_import_dynamic", "//go:cgo_export_dynamic", "//go:cgo_export_static", "//go:cgo_import_static", and "//go:cgo_dynamic_linker" directives, and the linker passed the dynamic linker path using "-Wl,--dynamic-linker,". Furthermore, the two-argument form of "//go:cgo_import_dynamic" (which is permitted in non-cgo Go source files) could overwrite the external symbol name of a symbol already marked for cgo export. A symbol name or dynamic linker path containing a comma or leading "@" could split "-Wl,--export-dynamic-symbol=" or "-Wl,--dynamic-linker," into arbitrary host linker flags or response file arguments.
The compiler and linker now reject commas in "//go:cgo_*" symbol and dynamic linker directives, the linker passes "-Wl,--dynamic-linker=", and "cgo_import_dynamic" no longer overwrites symbols exported via "cgo_export_dynamic" or "cgo_export_static".
Thanks to RyotaK (https://ryotak.net) of GMO Flatt Security Inc. for reporting this issue.
This is CVE-2026-97041 and Go issue https://go.dev/issue/82569.
cmd/cgo, cmd/compile, cmd/link: linker flag injection via cgo_import_dynamic and PE DLL names
Building a malicious package that uses "//go:cgo_import_dynamic" or links against a crafted PE object on Windows could pass unsafe library arguments to the external linker.
The compiler only checked the first character of the library name in "//go:cgo_import_dynamic" directives and skipped validation in cgo-generated files. In addition, on Windows, "cmd/cgo" and "cmd/link" did not validate imported DLL names extracted from PE object files before emitting "-l" flags for the external linker, allowing a crafted DLL name containing ".." path traversal or special characters to reference arbitrary files on disk.
The compiler now validates every character of the library name in "//go:cgo_import_dynamic" directives (including in cgo-generated files on Windows) and rejects ".." path traversal, and "cmd/cgo" and "cmd/link" reject PE imported DLL names containing path separators, "..", ":", or leading "-" or "@".
This issue was found by the Go Security Team during an internal audit.
This is CVE-2026-97042 and Go issue https://go.dev/issue/82568.
cmd/go, cmd/compile: unexpected code execution via escaped quotes in //go:cgo_ldflag
Building a malicious package that uses cgo could bypass "#cgo LDFLAGS" validation and cause unexpected code execution at build time, or cause the go command to panic, via crafted quoting in "//go:cgo_ldflag" directives.
When "cmd/cgo" generates "_cgo_gotypes.go", it quotes each "#cgo LDFLAGS" argument with strconv.Quote in a "//go:cgo_ldflag" directive, but "cmd/compile" and "cmd/go" parsed those directives by splitting on raw quote characters without handling backslash escapes or unquoting the string. This mismatch allowed disallowed linker flags or unvalidated linker search paths to be smuggled past the go command's flag checks and passed to the external linker. In addition, deduplicating LDFLAGS in the go command could panic with an out-of-bounds slice index when a prefix of the flag list matched near the end of the slice.
"cmd/compile" and "cmd/go" now properly handle backslash-escaped quotes and unquote "//go:cgo_*" pragma strings with strconv.Unquote, and the slice bounds check in processCgoOutputs has been fixed.
This issue was found by the Go Security Team during an internal audit.
This is CVE-2026-97043 and Go issue https://go.dev/issue/82567.
View the release notes for more information:
https://go.dev/doc/devel/release#go1.27.4You can download binary and source distributions from the Go website:
https://go.dev/dl/To compile from source using a Git clone, update to the release with
git checkout go1.27.4and build as usual.
Thanks to everyone who contributed to the releases.
Cheers,
Original source
Cherry and Junyang for the Go team - Nov 10, 2026
- Date parsed from source:Nov 10, 2026
- First seen by Releasebot:Nov 11, 2026
Go Turns 17
Go releases a year of major advances in language features, faster and safer libraries, modern hardware support, and developer tooling. Highlights include a modern JSON API, production goroutine leak profiling, post-quantum cryptography, and upgrades that help developers and AI coding assistants write idiomatic Go.
Today, November 10th, we celebrate the 17th anniversary of Go’s open source release!
Over the past year, we released Go 1.26 in February and Go 1.27 in August, alongside a steady stream of releases across our golang.org/x libraries and developer tools. Meanwhile, the pace of change across the software industry continues to accelerate, driven by shifting hardware, evolving security threats, and the rapid rise of AI-assisted development and agentic systems.
In a tumultuous time for the industry, Go aims to be a steady hand on the tiller. Our goal is to keep Go grounded in its foundational principles of simplicity, reliability, efficiency, and an unwavering commitment to compatibility, while adapting to modern hardware, production workloads, and developer workflows. Increasingly, our investments serve a dual purpose: what helps human engineers write, understand, and maintain reliable Go code at scale also provides the guardrails and authoritative context that AI coding assistants and agents need to be effective.
Core language and library improvements
In the language itself, Go 1.26 and 1.27 addressed several long-standing restrictions in generics and everyday Go syntax, guided by years of real-world experience. When generics first landed in Go 1.18, methods could not declare their own type parameters, which sometimes forced awkward package-level functions and “inside-out” nested calls. Go 1.27 introduced generic methods on non-interface types (such as the new Rand.N method in math/rand/v2), allowing APIs to stay naturally organized on types and enabling readable method chaining. Together with support for self-referential type constraints in Go 1.26 and broader type inference for generic function values in Go 1.27, generics in Go feel more complete and natural than ever.
Alongside generics, two refinements to value construction make everyday Go code cleaner and more concise. Go 1.26 extended the built-in new function to accept an initial value expression, allowing new(42) or new("go1.26") without the ubiquitous newInt-style helper functions used to populate optional pointer fields in JSON and protocol buffer structs. And in Go 1.27, struct literal keys can refer directly to fields of embedded or nested structs, reducing boilerplate in composite literals.
In the standard library, our focus has been on evolving Go’s “production stack” and eliminating subtle operational traps. Few packages are as central to that as encoding/json, which has been a mainstay of Go since before Go 1.0. While its core model has held up remarkably well for over 15 years, tighter JSON standards and security expectations have turned some of its original defaults into interoperability and security hazards, such as silently accepting invalid UTF-8 or duplicate object keys and matching struct fields case-insensitively. At the same time, its buffered design prevented true streaming and limited performance. Addressing these issues while upholding Go’s compatibility promise for the millions of existing programs that depend on encoding/json meant designing a new major version of the package.
Six years in the making, the new encoding/json/v2 and encoding/json/jsontext packages reached general availability in Go 1.27. Driven by Joe Tsai, Daniel Martí, and contributors from across the Go community, this modern JSON API brings safer, stricter defaults, flexible caller- and type-specified customization, and up to 10× faster unmarshaling, while cleanly separating high-level semantic marshaling (json/v2) from low-level, reflection-free syntactic streaming (jsontext). Crucially, we didn’t leave existing code behind: the original encoding/json package is now implemented entirely in terms of v2 under the hood. Existing v1 callers get faster unmarshaling simply by upgrading, and packages using v1 and v2 interoperate seamlessly so that the ecosystem can migrate gradually without flag days.
We’ve also brought new production diagnostics to Go’s concurrency primitives. Concurrency is one of Go’s greatest strengths, but goroutines accidentally left blocked on abandoned channels or locks can silently leak memory and CPU in long-running services, and traditional goroutine profiles cannot distinguish leaked goroutines from ones legitimately waiting for work. First previewed in Go 1.26 and now generally available in Go 1.27, the new goroutine leak profiler (goroutineleak in runtime/pprof and /debug/pprof/goroutineleak in net/http/pprof) solves this for production services. Contributed by Vlad Saioc and Uber’s Programming Systems team, building on academic research with Aarhus University and Washington University in St. Louis, the profiler repurposes the garbage collector’s reachability phase to identify goroutines blocked on concurrency primitives that no runnable goroutine can ever reach. That allows it to pinpoint leaks in production with near-zero false positives and zero overhead when not in use.
In net/http, closing an HTTP/1 response body with even a single unread byte—such as a trailing newline left behind by a JSON decoder—previously forced the client to tear down the underlying TCP and TLS connection. Go 1.27’s HTTP transport now automatically drains small unread response bodies in the background on close, turning a widespread latency footgun into up to a 5× speedup for sequential HTTP/1 requests while letting application code stay clean and simple.
These releases also added several notable standard library APIs, including a native uuid package, a generic and type-safe errors.AsType, and an in-memory httptest.NewTestServer designed for virtual-time testing with testing/synctest. Existing packages saw significant speedups as well: io.ReadAll now runs twice as fast while allocating half as much memory, compress/flate compresses faster (speeding up gzip, zip, zlib, and png), and image/jpeg has a faster, more accurate encoder and decoder.
Making the most of modern hardware
Modern CPUs look very different from the hardware Go first launched on 17 years ago, with wide vector units and deep, non-uniform memory hierarchies. A major focus of our runtime and compiler work is ensuring Go programs make full use of modern silicon, both transparently when you upgrade your toolchain and through new APIs when you need explicit control.
After debuting as an experiment in Go 1.25, the Green Tea garbage collector became the default in Go 1.26. By organizing object marking around contiguous memory spans rather than chasing pointers across the heap, Green Tea aligns with modern CPU memory architectures to reduce garbage collection overhead by 10–40% in real-world workloads—and by an additional ~10% on recent amd64 processors using AVX-512 vector instructions during scanning.
Of course, the runtime shouldn’t be the only part of a Go program that can tap into vector hardware. Without access to Single Instruction, Multiple Data (SIMD) capabilities, compute-intensive software, from cryptography and media processing to data analytics and AI, leaves a significant portion of modern silicon dark. Until recently, the only way to light up that hardware in Go was by writing and maintaining per-architecture assembly. To change that, Go 1.26 and 1.27 introduced two experimental SIMD packages: simd/archsimd, for low-level access to architecture-specific vector instructions on amd64, arm64 (NEON), and WebAssembly (wasm); and simd, a higher-level, width-agnostic API that provides portable, near-assembly performance across architectures with automatic fallback emulation.
We’ve also attacked the cost of memory allocation from multiple angles. The cheapest heap allocation is the one that never happens: in Go 1.26, the compiler began allocating initial slice backing stores on the stack at append sites—even for slices that ultimately escape to the heap—eliminating the flurry of small heap allocations that typically accompany slice growth. And for heap allocations more broadly, Go 1.27 introduced size-specialized memory allocation to speed up allocating the small objects (such as small structs, slices, and strings) that dominate allocator time. Generating dedicated fast-path allocator routines for size classes up to 80 bytes made small allocations up to 30% faster and improved overall performance in allocation-heavy programs. Together with a ~30% reduction in baseline cgo call overhead in Go 1.26, these improvements make Go programs faster and leaner out of the box.
Secure software and ecosystem defense
Go’s approach to security spans the entire lifecycle of software: providing safe APIs by design, preparing cryptography for the future, and actively defending the live ecosystem as new threats emerge.
To defend against store-now, decrypt-later attacks and support the industry’s accelerating timelines for quantum readiness, Go has continued expanding its post-quantum cryptography support. Go 1.26 enabled hybrid post-quantum key exchanges (SecP256r1MLKEM768 and SecP384r1MLKEM1024) by default in crypto/tls and added the crypto/hpke package (implementing RFC 9180 Hybrid Public Key Encryption, including post-quantum hybrid KEMs). Go 1.27 followed up with the new crypto/mldsa package, implementing the FIPS 204 post-quantum ML-DSA signature standard and integrating it into crypto/x509 and crypto/tls.
At the same time, we’ve continued hardening the standard library and runtime against subtle classes of vulnerabilities. Most key generation and signing functions across Go’s crypto/... packages now unconditionally draw from a secure system randomness source, closing off a classic footgun where non-cryptographic readers were accidentally passed in. Under the hood, Go 1.26 also added 64-bit heap base address randomization to harden cgo binaries and introduced the experimental runtime/secret package for eagerly erasing sensitive cryptographic temporaries from registers, stack frames, and the heap.
Securing Go deployments also requires rapid vulnerability and incident response in a fast-moving threat landscape. From the Go vulnerability database and govulncheck to our release infrastructure, we’ve invested heavily in ecosystem defense. In October, that preparation was put to the test during the eMudhra certificate key disclosure incident, when eight intermediate TLS and code-signing certificates chaining to a widely trusted root CA were discovered to use trivially weak private keys. Because Linux lacks a uniform OS-level certificate revocation mechanism, Go’s built-in TLS verifier is the frontline defense for millions of Linux services. Within seven and a half hours of initial notification, the Go Security team shipped a targeted block in our first-ever URGENT track security release (Go 1.27.3 and Go 1.26.10) alongside an updated Go vulnerability database entry so govulncheck could flag affected binaries, giving Go users everything they needed to protect their deployments before the weak keys were publicly disclosed the next morning.
Advancing the broader Go platform and tooling
Go has always been more than a compiler and standard library: it is an end-to-end platform for software engineering. Over the past year, our work in golang.org/x/tools, the gopls language server, vscode-go, and pkg.go.dev has focused on making that platform even more productive for both human developers and AI coding assistants.
In last fall’s Go Developer Survey, the single biggest challenge developers reported was ensuring their code follows best practices and current Go idioms. As Go evolves while standing by its compatibility promise, older ways of writing code continue to work alongside newer, clearer, or faster alternatives, creating a natural drift in idioms over time. That drift has been compounded by AI coding assistants, which gravitate toward the older patterns that dominate their training data.
Go 1.26 tackled this with a complete overhaul of the go fix command, returning the long-dormant tool to its pre-Go 1.0 roots to apply dozens of automatic modernizers across entire codebases. What gofmt did for stylistic consistency, modernizers aim to do for idiomatic consistency. Available both as instant suggestions in gopls and as bulk, push-button upgrades in go fix, modernizers simplify existing code and help developers discover new language and library features. We now routinely consider whether new language and library proposals should ship with a modernizer of their own. Just as importantly, modernizers give coding agents an immediate way to bring generated code up to date, while helping shift the global corpus of open source Go code so that future models learn modern idioms from the start.
Bespoke modernizers work well for the language and standard library, but a centralized team can never write them for every third-party module in the ecosystem. That’s why Go 1.26 also introduced the annotation-driven source-level inliner, the first step toward a “self-service” paradigm for automated code maintenance. Any package author can now annotate a deprecated function, type, or constant with //go:fix inline, and the inliner will safely migrate callers and references via go fix or in the IDE, carefully handling evaluation order, side effects, and name shadowing.
In the editor, we’ve made four feature-packed releases of gopls over the past year (v0.21.0, v0.22.0, v0.23.0, and v0.24.0). In collaboration with the Dart team, we designed and proposed an open Language Server Protocol (LSP) extension for interactive refactoring, allowing language servers to ask for user input through dynamic, multi-step dialogs in any supporting editor. Now integrated into gopls and vscode-go, interactive refactoring powers customizable struct tag addition and removal, interface implementation (including generic interfaces) with live symbol search, and cross-package declaration moves. Beyond refactoring, gopls also gained generalized package renaming across directories, zero-configuration support for editing Go assembly files, subexpression hover inspection, completions and inlay hints for promoted fields, automatic govulncheck scanning when go.mod dependencies change, and continued enhancements to its built-in Model Context Protocol (MCP) server for AI coding assistants.
Rounding out the developer platform, in May we launched the official pkg.go.dev API and followed up with support for go doc pkg@version in Go 1.27. Previously, developer tools and IDE integrations had to resort to fragile web scraping to query ecosystem metadata. Today, the pkg.go.dev API gives tool authors and AI coding agents a fast, authoritative service for querying module versions, package symbols, importers, and vulnerability data, while go doc pkg@version makes it easy to pull up documentation for any version of any package right from the command line.
Looking ahead
We have an ambitious year ahead for Go.
On the tooling front, we’re building on the pkg.go.dev API, gopls, and go fix to make Go’s developer tools even more capable for both human developers and coding agents. Following the strong community response to go fix and //go:fix inline, we’re exploring ways to expand self-service static analysis, enabling developers, package maintainers, and organizations to easily integrate custom analyzers and domain-specific best-practice checks directly into their development workflows. We’re also exploring ways to surface richer package health and quality signals on pkg.go.dev and through its API, helping developers and coding agents evaluate and choose trustworthy, reliable dependencies.
In the language and libraries, Go 1.28 will resolve one of Go’s longest-standing language requests by allowing composite literals to omit redundant types whenever the type can be inferred from context, cutting visual noise in deeply nested configurations, API requests, and table-driven tests. And with recent generics refinements and hashing APIs in place, we’ve just accepted a swath of proposals for generic collection APIs—including sets, ordered maps, and more—which will land in golang.org/x/exp over the next few weeks so the community can try them out and share feedback ahead of future standard library inclusion.
Under the hood, we’re working hard to graduate a large subset of the simd and simd/archsimd packages (covering amd64, arm64 NEON, and wasm) in Go 1.28, with further expansions and arm64 scalable vector (SVE) support targeted for Go 1.29. Amid the global RAM crunch, reducing Go’s memory footprint is also one of our major priorities for the coming year.
In the toolchain, Go 1.28 will increase build parallelism by writing compiler export data early and streamline static analysis by decoupling tool export data from the compiler. Looking further out, we’re working to support cgo builds without requiring a C toolchain, and we’re kicking the tires on WebAssembly’s early-stage stack-switching extension, which is already showing promising improvements in Go Wasm performance and binary size.
Finally, ensuring Go stands the test of time means scaling not just our technology, but the open source project itself. Over the past year, some of Go’s most impactful advances, including encoding/json/v2 and the goroutineleak profile, were driven by or built in close partnership with contributors outside Google. To better support our growing ecosystem and contributor base, we’re working to bridge the gap between Go maintainers at Google and our broader community, and to diversify Go’s technical stewardship. That includes restructuring the proposal process to improve throughput, give the community clearer visibility into the process and input into prioritization, and formally involve community contributors in triage and review. Beyond proposals, we are building a clearer contributor ladder to empower proven contributors with greater autonomy, decision-making privileges, and maintenance responsibilities, and opening up maintainer summits and day-to-day communications to trusted contributors from our amazing community.
Seventeen years in, Go is thriving because of the people who use it, build with it, and contribute to it every day. Thank you to everyone in the Go community for being part of this journey, and we wish you all the best in the year ahead!
Original source All of your release notes in one feed
Join Releasebot and get updates from Google and hundreds of other software products.
- Nov 4, 2026
- Date parsed from source:Nov 4, 2026
- First seen by Releasebot:Nov 5, 2026
A new Go API for JSON
Go releases stable, generally available JSON v2 packages in Go 1.27, bringing stricter input validation, more flexible customization and streaming APIs, and faster unmarshaling while preserving support for the original package.
Michael Pratt, Joe Tsai, Daniel Martí, Johan Brandhorst-Satzkorn, Roger Peppe, Chris Hines, and Damien Neil
4 November 2026Introduction
JavaScript Object Notation (JSON) is a simple data interchange format, the most popular data format used on the internet, and widely read and written by Go programs. Go has included support for JSON in the standard library since well before Go 1.0. We first we wrote about support for JSON in Go more than 15 years ago!
Over time, packages evolve with the needs of their users, and encoding/json is no exception. Last year, we wrote about a new experimental API for JSON designed to bring long-awaited improvements and fixes.
After additional feedback and refinement, the new encoding/json/v2 and encoding/json/jsontext packages are stable and generally available in Go 1.27! This post is an updated version of the article introducing the experiment, describing the problems with encoding/json, and an introduction to the new packages.
Problems with encoding/json
Overall, encoding/json has held up well. The idea of marshaling and unmarshaling arbitrary Go types with some default representation in JSON, combined with the ability to customize the representation, has proven to be highly flexible. However, in the years since its introduction, various users have identified numerous shortcomings.
Behavior flaws
There are various behavioral flaws in encoding/json:
- Imprecise handling of JSON syntax: Over the years, JSON has seen increased standardization in order for programs to properly communicate. Generally, decoders have become stricter at rejecting ambiguous inputs, to reduce the chance that two implementations will have different (successful) interpretations of a particular JSON value.
- encoding/json currently accepts invalid UTF-8, whereas the latest Internet Standard (RFC 8259) requires valid UTF-8. The default behavior should report an error in the presence of invalid UTF-8, instead of introducing silent data corruption, which may cause problems downstream.
- encoding/json currently accepts objects with duplicate member names. RFC 8259 does not specify how to handle duplicate names, so an implementation is free to choose an arbitrary value, merge the values, discard the values, or report an error. The presence of a duplicate name results in a JSON value without a universally agreed upon meaning. This could be exploited by attackers in security applications and has been exploited before (as in CVE-2017-12635). The default behavior should err on the side of safety and reject duplicate names.
- Leaking nilness of slices and maps: JSON is often used to communicate with programs using JSON implementations that do not allow null to be unmarshaled into a data type expected to be a JSON array or object. Since encoding/json marshals a nil slice or map as a JSON null, this may lead to errors when unmarshaling by other implementations. A survey indicated that most Go users prefer that nil slices and maps are marshaled as an empty JSON array or object by default.
- Case-insensitive unmarshaling: When unmarshaling, a JSON object member name is resolved to a Go struct field name using a case-insensitive match. This is a surprising default, a potential security vulnerability, and a performance limitation.
- Inconsistent calling of methods: Due to an implementation detail, MarshalJSON methods declared on a pointer receiver are inconsistently called by encoding/json. While regarded as a bug, this cannot be fixed as too many applications depend on the current behavior.
API deficiencies
The API of encoding/json can be tricky or restrictive:
- It is difficult to correctly unmarshal from an io.Reader. Users often write json.NewDecoder(r).Decode(v), which fails to reject trailing junk at the end of the input.
- Options can be set on the Encoder and Decoder types, but cannot be used with the Marshal and Unmarshal functions. Similarly, types implementing the Marshaler and Unmarshaler interfaces cannot make use of the options and there is no way to plumb options down the call stack. For example, the Decoder.DisallowUnknownFields option loses its effect when calling a custom UnmarshalJSON method.
- The Compact, Indent, and HTMLEscape functions write to a bytes.Buffer instead of something more flexible like a []byte or io.Writer. This limits the usability of those functions.
Performance limitations
Setting aside internal implementation details, the public API commits it to certain performance limitations:
- MarshalJSON: The MarshalJSON interface method forces the implementation to allocate the returned []byte. Also, the semantics require that encoding/json verify that the result is valid JSON and also to reformat it to match the specified indentation.
- UnmarshalJSON: The UnmarshalJSON interface method requires that a complete JSON value be provided (without any trailing data). This forces encoding/json to parse the JSON value to be unmarshaled in its entirety to determine where it ends before it can call UnmarshalJSON. Afterwards, the UnmarshalJSON method itself must parse the provided JSON value again.
- Lack of streaming: Even though the Encoder and Decoder types operate on an io.Writer or io.Reader, they buffer the entire JSON value in memory. The Decoder.Token method for reading individual tokens is allocation-heavy and there is no corresponding API for writing tokens.
Furthermore, if the implementation of a MarshalJSON or UnmarshalJSON method recursively calls the Marshal or Unmarshal function, then the performance becomes quadratic.
Trying to fix encoding/json
Introducing a new, incompatible major version of a package is a heavy consideration. If possible, we should try to fix the existing package.
While it is relatively easy to add new features, it is difficult to change existing features. Unfortunately, these problems are inherent consequences of the existing API, making them practically impossible to fix within the Go 1 compatibility promise.
We could in principle declare separate names, such as MarshalV2 or UnmarshalV2, but that is tantamount to creating a parallel namespace within the same package. This leads us to encoding/json/v2 (henceforth called v2), where we can make these changes within a separate v2 namespace in contrast to encoding/json (henceforth called v1).
Building on encoding/json/jsontext
Before discussing the v2 API, we first introduce the encoding/json/jsontext package that lays the foundation for improvements to JSON in Go.
JSON serialization in Go can be broken down into two primary components:
- syntactic functionality that is concerned with processing JSON based on its grammar, and
- semantic functionality that defines the relationship between JSON values and Go values.
We use the terms “encode” and “decode” to describe syntactic functionality and the terms “marshal” and “unmarshal” to describe semantic functionality. We aim to provide a clear distinction between functionality that is purely concerned with encoding versus that of marshaling.
This diagram provides an overview of this separation. Purple blocks represent types, while blue blocks represent functions or methods. The direction of the arrows approximately represents the flow of data. The bottom half of the diagram, implemented by the jsontext package, contains functionality that is only concerned with syntax, while the upper half, implemented by the json/v2 package, contains functionality that assigns semantic meaning to syntactic data handled by the bottom half.
The basic API of jsontext is the following:
package jsontext type Encoder struct { ... } func NewEncoder(io.Writer, ...Options) *Encoder func (*Encoder) WriteValue(Value) error func (*Encoder) WriteToken(Token) error type Decoder struct { ... } func NewDecoder(io.Reader, ...Options) *Decoder func (*Decoder) ReadValue() (Value, error) func (*Decoder) ReadToken() (Token, error) type Kind byte type Value []byte func (Value) Kind() Kind type Token struct { ... } func (Token) Kind() KindThe jsontext package provides functionality for interacting with JSON at a syntactic level and derives its name from RFC 8259, section 2 where the grammar for JSON data is literally called JSON-text. Since it only interacts with JSON at a syntactic level, it does not depend on Go reflection.
The Encoder and Decoder provide support for encoding and decoding JSON values and tokens. The constructors accept variadic options that affect the particular behavior of encoding and decoding. Unlike the Encoder and Decoder types declared in v1, the new types in jsontext avoid muddling the distinction between syntax and semantics and operate in a truly streaming manner.
A JSON value is a complete unit of data and is represented in Go as a named []byte. It is identical to RawMessage in v1, which is now a type alias to jsontext.Value. A JSON value is syntactically composed of one or more JSON tokens. A JSON token is represented in Go as the opaque Token type with constructors and accessor methods. It is analogous to Token in v1 but is designed represent arbitrary JSON tokens without allocation.
To resolve the fundamental performance problems with the MarshalJSON and UnmarshalJSON interface methods, we need an efficient way of encoding and decoding JSON as a streaming sequence of tokens and values. In v2, we introduce the MarshalJSONTo and UnmarshalJSONFrom interface methods that operate on an Encoder or Decoder, allowing the methods’ implementations to process JSON in a purely streaming manner. Thus, the json package need not be responsible for validating or formatting a JSON value returned by MarshalJSON, nor would it need to be responsible for determining the boundaries of a JSON value provided to UnmarshalJSON. These responsibilities belong to the Encoder and Decoder.
Introducing encoding/json/v2
Building on the jsontext package, we now introduce the encoding/json/v2 package. It is designed to fix the problems in v1, while remaining familiar to users of the v1 package. Our goal is that usages of v1 will operate mostly the same if directly migrated to v2.
Here, we primarily cover the high-level API of v2. For examples on how to use it, we encourage readers to study the examples in the v2 package, the “Working with JSON” tutorial, or read Anton Zhiyanov’s blog covering the topic.
The basic API of v2 is the following:
package json func Marshal(in any, opts ...Options) (out []byte, err error) func MarshalWrite(out io.Writer, in any, opts ...Options) error func MarshalEncode(out *jsontext.Encoder, in any, opts ...Options) error func Unmarshal(in []byte, out any, opts ...Options) error func UnmarshalRead(in io.Reader, out any, opts ...Options) error func UnmarshalDecode(in *jsontext.Decoder, out any, opts ...Options) errorThe Marshal and Unmarshal functions have a signature similar to v1, but accept options to configure their behavior. The MarshalWrite and UnmarshalRead functions directly operate on an io.Writer or io.Reader, avoiding the need to temporarily construct an Encoder or Decoder just to write or read from such types. The MarshalEncode and UnmarshalDecode functions operate on a jsontext.Encoder and jsontext.Decoder and is actually the underlying implementation of the previously mentioned functions. Unlike v1, options are a first-class argument to each of the marshal and unmarshal functions, greatly extending the flexibility and configurability of v2. There are several options available in v2 which are not covered by this article.
Type-specified customization
Similar to v1, v2 allows types to define their own JSON representation by satisfying particular interfaces.
type Marshaler interface { MarshalJSON() ([]byte, error) } type MarshalerTo interface { MarshalJSONTo(*jsontext.Encoder) error } type Unmarshaler interface { UnmarshalJSON([]byte) error } type UnmarshalerFrom interface { UnmarshalJSONFrom(*jsontext.Decoder) error }The Marshaler and Unmarshaler interfaces are identical to those in v1. The new MarshalerTo and UnmarshalerFrom interfaces allow a type to represent itself as JSON using a jsontext.Encoder or jsontext.Decoder. This allows options to be forwarded down the call stack, since options can be retrieved via the Options accessor method on the Encoder or Decoder.
See the OrderedObject example for how to implement a custom type that maintains the ordering of JSON object members.
Caller-specified customization
In v2, the caller of Marshal and Unmarshal can also specify a custom JSON representation for any arbitrary type, where caller-specified functions take precedence over type-defined methods or the default representation for a particular type.
func WithMarshalers(*Marshalers) Options type Marshalers struct { ... } func MarshalFunc[T any](fn func(T) ([]byte, error)) *Marshalers func MarshalToFunc[T any](fn func(*jsontext.Encoder, T) error) *Marshalers func WithUnmarshalers(*Unmarshalers) Options type Unmarshalers struct { ... } func UnmarshalFunc[T any](fn func([]byte, T) error) *Unmarshalers func UnmarshalFromFunc[T any](fn func(*jsontext.Decoder, T) error) *UnmarshalersMarshalFunc and MarshalToFunc construct a custom marshaler that can be passed to a Marshal call using WithMarshalers to override the marshaling of particular types. Similarly, UnmarshalFunc and UnmarshalFromFunc support similar customization for Unmarshal.
The ProtoJSON example demonstrates how this feature allows serialization of all proto.Message types to be handled by the protojson package.
Behavior differences
While v2 aims to behave mostly the same as v1, its behavior has changed in some ways to address problems in v1, most notably:
- v2 reports an error in the presence of invalid UTF-8.
- v2 reports an error if a JSON object contains a duplicate name.
- v2 marshals a nil Go slice or Go map as an empty JSON array or JSON object, respectively.
- v2 unmarshals a JSON object into a Go struct using a case-sensitive match from the JSON member name to the Go field name.
- v2 redefines the omitempty tag option to omit a field if it would have encoded as an “empty” JSON value (which are null, "", [], and {}).
- v2 reports an error when trying to serialize a time.Duration, which currently has no default representation, but provides options to let the caller decide.
For most behavior changes, there is a struct tag option or caller-specified option that can configure the behavior to operate under v1 or v2 semantics, or even other caller-determined behavior. See “Migrating to v2” for more information.
Performance optimizations
The Marshal performance of v2 is roughly at parity with v1. Sometimes it is slightly faster, but other times it is slightly slower. The Unmarshal performance of v2 is significantly faster than v1, with benchmarks demonstrating improvements of up to 10x.
In order to obtain greater performance gains, existing implementations of Marshaler and Unmarshaler should migrate to also implement MarshalerTo and UnmarshalerFrom, so that they can benefit from processing JSON in a purely streaming manner. For example, recursive parsing of OpenAPI specifications in UnmarshalJSON methods significantly hurt performance in a particular service of Kubernetes (see kubernetes/kube-openapi#315), while switching to UnmarshalJSONFrom improved performance by orders of magnitude.
For more benchmark details, see the go-json-experiment/jsonbench repository.
On top of structural improvements, we’re continuing to invest in performance optimizations in the implementation for cases where the v2 implementation is slower than v1. You can expect additional improvements in Go 1.28.
Compatibility
The Go 1 compatibility promise is a core guarantee from the Go project that allows developers to build applications that will stand the test of time and continue working on future versions of Go.
The original encoding/json and new encoding/json/v2 packages are of course both subject to the Go 1 compatibility promise. Applications using v1 will continue to be supported indefinitely and need not ever migrate to v2.
That said, when designing the v2 packages we wanted to do better than keeping v1 supported. We wanted to ensure that v1 and v2 are compatible with one another so that packages using different versions can work together. Doing so allows a smooth ecosystem migration rather than forcing users to use one version or another due to the choices of their dependencies.
For instance, suppose your package uses v2 to marshal a struct containing a field with a type defined in another package. That package may use the original MarshalJSON method to define its marshaling behavior. No problem, v2 supports MarshalJSON methods, so marshaling will continue working as expected.
Vice versa, suppose your package uses v1 to marshal the same struct. The other package may use the v2 MarshalJSONTo method for better performance. No problem here either, as the v1 implementation supports v2’s MarshalJSONTo method under the hood.
We’ve achieved this by designing the new packages such that, under the hood, v1 is implemented in terms of v2. As mentioned above, v2 supports a variety of Options. Each behavior difference is controlled by one of the these options. Thus, v1 can be implemented in terms of v2 by passing the full set of v1 compatibility options.
With this approach, backwards-compatible additions such as new methods (e.g., MarshalJSONTo) or new struct tags (e.g., embed) are automatically supported to the benefit of existing v1 users.
Migration
Implementing v1 in terms of v2 options has the additional benefit of allowing gradual migration of callsites.
encoding/json documents the full set of behavior differences between v1 and v2, and which option controls that behaviors.
Many applications can migrate directly to v2 with no visible behavior changes, but applications that depend on v1 behavior can use the options to change only the behaviors they depend on.
For example, we can select all v2 behavior except for allowing duplicate names:
json.Marshal(..., json.DefaultOptionsV2(), jsontext.AllowDuplicateName(true))Alternatively, we can select all v1 behavior except for disallowing duplicate names:
json.Marshal(..., jsonv1.DefaultOptionsV1(), jsontext.AllowDuplicateName(false))The encoding/json/v2 Migration Guide goes into more detail, covering a variety of scenarios for approaching migration of an application from v1 to v2.
More information
For additional references on working with the new JSON packages, see:
- The “Working with JSON” tutorial,
- The encoding/json/v2 and encoding/json/jsontext package documentation,
- The encoding/json package’s v2 comparison documentation,
- and the encoding/json/v2 Migration Guide.
A long time coming
The planning for a new major version of encoding/json spanned years. In late 2020, spurred on by the inability to fix issues in the current package, Daniel Martí (one of the maintainers of encoding/json) first drafted his thoughts on what a hypothetical v2 package should look like. Separately, after previous work on the Go API for Protocol Buffers, Joe Tsai was disappointed that the protojson package needed to use a custom JSON implementation because encoding/json was neither capable of adhering to the stricter JSON standard that the Protocol Buffer specification required, nor of efficiently serializing JSON in a streaming manner.
Believing a brighter future for JSON was both beneficial and achievable, Daniel and Joe joined forces to brainstorm on v2 and started to build a prototype (with the initial code being a polished version of the JSON serialization logic from the Go protobuf module). Over time, a few others (Roger Peppe, Chris Hines, Johan Brandhorst-Satzkorn, Damien Neil, Austin Clements, and Michael Pratt) joined the effort by providing design review, code review, and regression testing. Many of the early discussions are publicly available in our recorded meetings and meeting notes. Later discussions are available in our encoding/json/v2 working group meeting notes.
This work has been public since the beginning, and we increasingly involved the wider Go community, first with a GopherCon talk and discussion posted in late 2023, formal proposal posted in early 2025, and finally adopting encoding/json/v2 as a Go experiment in Go 1.25 for wider-scale testing by all Go users.
The v2 effort took about 6 years to reach this point, incorporating feedback from many contributors and also gaining valuable empirical experience from use in production settings.
It’s worth noting that it’s largely been developed and promoted by people not employed by Google, demonstrating that the Go project is a collaborative endeavor with a thriving global community dedicated to improving the Go ecosystem.
Thank you to everyone that contributed!
Original source - Oct 27, 2026
- Date parsed from source:Oct 27, 2026
- First seen by Releasebot:Oct 30, 2026
Vulnerabilities in golang.org/x/net
Go releases golang.org/x/net v0.62.0 with fixes for two HTML security issues, improving text-node parsing efficiency and ensuring rendered raw text preserves namespace handling across ancestor transitions.
Hello gophers,
We have tagged version v0.62.0 of golang.org/x/net in order to address the following security issues:
html: avoid quadratic complexity when coalescing text nodes
When coalescing adjacent text nodes in addText and fosterParent, appending to an existing TextNode's Data via string concatenation (n.Data += text) reallocated and copied the accumulated string on every token. Inputs containing many short text runs separated by ignored end tags (such as "a") caused O(n^2) allocations and byte copies.
Accumulate coalesced text in per-node byte slices during parsing and materialize Data strings once at the end of parse.
Thanks to Markus Magnuson for reporting this issue.
This is CVE-2026-78661 and Go issue https://go.dev/issue/82224.
html: check all ancestor namespace transitions when rendering raw text
In childTextNodesAreLiteral, walking up the tree previously stopped at the nearest foreign ancestor once an HTML integration point was found. However, that integration point may itself be a descendant of an element that was foster-parented into a foreign namespace (such as or fostered under ), causing a parser to resolve the subtree in a different foreign namespace upon re-parsing the rendered output.
Continue walking the full ancestor chain and verify that every transition from a non-empty namespace occurs at an HTML integration point before emitting literal text.
Thanks to Ali Sherif (https://www.linkedin.com/in/ali-sherif-13812b276) for reporting this issue.
This is CVE-2026-97045 and Go issue https://go.dev/issue/82622.
Cheers,
Original source
Go Security team - Oct 26, 2026
- Date parsed from source:Oct 26, 2026
- First seen by Releasebot:Oct 27, 2026
Our Response To The eMudhra Key Disclosure Incident
Go shipped an urgent security release that blocks certificates tied to compromised eMudhra intermediates, protecting TLS connections. The incident also prompted faster release-process improvements and plans to prioritize Linux certificate-revocation support.
On October 19, the Go team initiated an expedited security release to protect Go users and their applications from a critical public key infrastructure (PKI) compromise involving certificates issued by eMudhra.
Within approximately seven and a half hours of being notified, we shipped a targeted patch, which was included in our first-ever URGENT track security release.
Here is the context behind the incident, why Go stepped in at the runtime level to protect our users and how our incident response unfolded.
eMudhra Incident
On October 17, Mozilla added eight intermediate certificates (six used for TLS, and two used for code signing) issued by a root certificate controlled by eMudhra to OneCRL, effectively blocking their usage in Firefox. Soon after, a number of security researchers noticed this and began investigating what might’ve caused this.
On October 19, the Go Security team was made aware of these investigations and their conclusions, which showed that the keys associated with these intermediates were trivially weak, allowing recovery of the private keys in microseconds.
Due to the fact that the eMudhra root certificate was present in most trusted root programs, recovering the private keys would allow any attacker to sign arbitrary TLS certificates for any domain name, without the usual requirement to show proof of control of said domain name. This would allow an attacker to man-in-the-middle (MITM) TLS connections and present a valid certificate for a domain name they did not control, effectively allowing them to impersonate any TLS server the targeted machine attempted to connect to.
Go ships a TLS certificate verifier in the standard library. When users use net/http or crypto/tls to connect to a TLS service, the verifier is called to check if the certificates the other side of the connection presents are valid. On Windows and macOS we delegate these checks to the platform APIs, and on Linux, which lacks platform APIs, we use our own verifier implementation.
Since Linux does not have a uniform built-in mechanism to handle revocation checking, and in order to provide a timely fix for users on other platforms that might not receive platform updates, we decided the best way to protect Go users was to do an URGENT track security release which similarly removed trust.
Incident Timeline
A typical Go security release follows a multi-day process, with advanced pre-announcements in order to allow those who rely on Go to prepare. In this case, because we believed that private key exposure was imminent, our team chose to use the URGENT track for the first time in order to ship protections before active public exploitation could begin.
11:45 PDT
Our Security team was alerted by an independent external researcher, citing unreported actions by Mozilla and other organizations to remove trust in eight eMudhra intermediates. It became clear quickly that this was due to weak private keys they used.
12:30 PDT
Mozilla independently reported the issue to our Security team, confirming the issue, and asking that we not immediately disclose the issue, but encouraging us to release a fix as soon as possible.
14:00 PDT
We finalized a patch which blocked the usage of certificates which chained to the compromised intermediates, and thanks to the researcher who initially alerted us to the issue, had a set of certificates signed using the recovered keys to test against.
15:00 PDT
We began the process to release minor Go versions 1.27.3 and 1.26.10 containing our patch. Due to the urgent nature of this issue and its exploitability, and with the belief that the private keys would likely become publicly known within hours, we decided an immediate release was the most prudent option.
19:13 PDT
We finalized the release and announced it publicly. At this time the underlying issue was still not widely known. In an effort to give other defenders a chance to protect as many users as possible without revealing to attackers how the issue could be exploited, our patch and communications were somewhat opaque, warning users that we were “blocking trust in a small set of intermediate certificates due to specific security concerns around their operation” and urging users to immediately upgrade to this release.
In under seven and a half hours from initial notification, patched Go releases were live worldwide, giving users everything they needed to secure their deployments before the keys became public.
By the morning of October 20, numerous independent researchers had publicly disclosed the weak keys.
Lessons Learned and Future Improvements
This was our first ever URGENT track security release, and during the release process we ran into a number of issues which caused the release to take longer than expected.
While we are happy we were able to get a release out the same day we were notified of the issue, in the modern security environment we feel that we should be able to provide releases in a more compressed timeline. The issues we ran into caused our release process to take just under four and a quarter hours from start to finish.
These issues had previously not been problematic, since the typical release process is split up over a number of days.
We’ve subsequently made a number of changes to improve our release efficiency, which should significantly reduce the time it takes us to push out a release, enhancing our ability to quickly respond to urgent security threats.
PRIVATE track security fixes are pre-announced three to seven days before their release. URGENT track fixes happen on a shorter time schedule, but we could have pre-announced the upcoming release when we began the release process, giving users at least a few hours to prepare.
While on Windows and macOS we rely on the revocation mechanisms the platform APIs provide, on Linux we don’t currently have a similar mechanism. The lack of this support was one of our major drivers to issue an expedited security release, as we did not want to leave Linux users exposed to this issue longer than was necessary.
Hence we are planning on prioritizing work to bring parity to revocation support on Linux, to help mitigate this class of issues in the future. Part of this work will involve investigating adding support for the upki project, which aims to “provide reliable, privacy-preserving and efficient certificate revocation” for Linux (see issue #82402).
Upgrading and Verifying Your Deployments
If you run Go binaries which interact with network services using TLS (such as directly via net/http or crypto/tls or via a dependency such as gRPC), ensure you are running on the latest minor releases. Binaries rebuilt with Go 1.27.3 and 1.26.10 will automatically reject certificates issued by the compromised eMudhra intermediates.
You can verify your current toolchain version using go version and you can check the version of Go a binary was built with using go version -m .
The govulncheck tool can also be used to determine if a binary is affected by this issue:
$ GOTOOLCHAIN=go1.27.3+auto go install golang.org/x/vuln/cmd/govulncheck@latest $ govulncheck -mode=binary <path_to_your_binary>Securing Go Deployments Everywhere
For us, securing Go and its users extends beyond fixing direct security vulnerabilities in the runtime and libraries we ship. In order to keep the ecosystem secure, we believe we also need to provide users with the right tools to write secure software, look towards the future of cryptographic algorithms and protocols, and proactively respond to ecosystem wide issues when we can.
We are grateful to the independent security researchers and the Mozilla security team for this rapid notification and coordination during this incident.
Original source Similar to Go with recent updates:
- Gemini updates481 release notes · Latest Nov 23, 2026
- Antigravity updates93 release notes · Latest Nov 20, 2026
- Gemini API updates160 release notes · Latest Nov 19, 2026
- Gemini CLI updates175 release notes · Latest Nov 19, 2026
- Claude updates196 release notes · Latest Nov 23, 2026
- ChatGPT updates256 release notes · Latest Nov 20, 2026
- Oct 19, 2026
- Date parsed from source:Oct 19, 2026
- First seen by Releasebot:Oct 21, 2026
Go 1.27.3 and Go 1.26.10
Go releases a security update that blocks trust in a small set of intermediate certificates and filters affected certificate chains, addressing a security concern in crypto/x509.
Hello gophers,
We have just released Go versions 1.27.3 and 1.26.10, minor point releases.
These releases include 1 security fix following the security policy:
crypto/x509: mitigation for security concerns with a specific Certificate Authority
We're blocking trust in a small set of intermediate certificates due to specific security concerns around their operation. Verify will now filter out chains which contain these intermediates, preventing them from being returned to the caller. We highly recommend immediately upgrading to this release. This is CVE-2026-111943 and Go issue https://go.dev/issue/82345.
View the release notes for more information:
https://go.dev/doc/devel/release#go1.27.3
You can download binary and source distributions from the Go website:
https://go.dev/dl/
To compile from source using a Git clone, update to the release with
git checkout go1.27.3and build as usual.
Thanks to everyone who contributed to the releases.
Cheers,
Original source
Carlos and David for the Go team - Oct 16, 2026
- Date parsed from source:Oct 16, 2026
- First seen by Releasebot:Oct 17, 2026
Interactive refactoring in gopls
Go adds interactive refactoring to gopls and the VS Code extension, letting developers guide code transformations through editor dialogs. Available refactorings include customizing struct tags and generating interface methods, with declaration moves in preview and more capabilities planned.
When editing code in a modern IDE or editor, developers rely on its refactoring features to automate common transformations. Today, we are excited to introduce interactive refactoring in gopls, powered by a new capability we are proposing for the Language Server Protocol (LSP) that brings dynamic, multi-step dialogs directly into your favorite editor. Crucially, we designed this capability (in collaboration with the Dart team) not just for Go, but as an open standard for all programming languages and editor ecosystems. Working support is already available in gopls v0.24.0 and the official Go extension for VS Code v0.56.0.
What is the Language Server Protocol (LSP)?
The LSP is an open standard that decouples language-specific features from specific text editors. As you navigate and edit code, your editor (such as VS Code, Neovim, or Emacs) and a language server (like gopls) engage in a continuous JSON-RPC exchange to provide features like autocomplete, hover documentation, diagnostics, and code actions.
Multi-step code transformation
Today, almost every code transformation in the LSP is like a function of no parameters: you trigger the operation, and the server immediately computes the edits. (Renaming a symbol is the sole exception: because it is a function of one parameter, the desired new name, it required its own dedicated PrepareRename RPC in the protocol.)
The language server must deduce the user’s intent from context alone, namely the cursor position and the enclosing syntax tree. When that context is not enough, the server is forced into one of two choices: apply a one-size-fits-all default, or refrain from offering the transformation altogether. The limitation lies not in gopls’s ability to compute the necessary edits, but in the LSP’s lack of a mechanism for language servers to ask the user for input.
For many transformations, this parameterless model works well. But many others need additional input from the user: which struct tags to add and in what naming convention, which interface to implement, which file to move a declaration to. Without a way to ask, gopls could only guess—“Add struct tags”, for example, always produced json tags in camelCase—or not offer the refactoring at all. With interactive refactoring, language servers can now easily provide new operations with one or more parameters.
Our LSP interactive refactoring proposal solves this by establishing a standard mechanism for language servers to collect user input before computing text edits. For Go developers, this unlocks a suite of long-awaited refactorings, including:
- golang/go#70583: Move Declaration
- golang/go#38028: Change Signature
- golang/vscode-go#1547: Implement Interface
- golang/vscode-go#2002: Modify Struct Tags
among many others.
Interactive refactorings in action
Adding and removing struct tags (gopls v0.23.0)
When configuring serialization formats, developers frequently need custom tags and casing conventions. Previously, running “Add struct tags” unconditionally injected json tags using camelCase formatting.
With interactive refactoring:
- Place your cursor on any struct definition and select the “Add struct tags” code action.
- An input dialog appears, pre-filled with json, allowing you to customize any combination of tags (such as json,yaml,db).
- A second dialog lets you select your desired naming convention (such as camelCase, snake_case, or PascalCase).
- Gopls generates and applies the formatted struct tags across your type definition.
Here is the before-and-after transformation:
type UserProfile struct { ID int64 FirstName string LastName string EmailAddr string } type UserProfile struct { ID int64 `json:"id" db:"id"` FirstName string `json:"first_name" db:"first_name"` LastName string `json:"last_name" db:"last_name"` EmailAddr string `json:"email_addr" db:"email_addr"` }Similarly, “Remove struct tags” now asks you for the specific tag keys you wish to delete (for example, removing only db tags while preserving the json tag), rather than wiping out all struct tags indiscriminately.
Implementing interfaces with dynamic symbol search
When creating a type to satisfy an interface, developers previously had to copy the interface declaration and manually turn it into a set of methods on the receiver type (or rely on external tools like impl by manually typing the receiver and qualifying the name of the interface).
Since gopls v0.23.0, with interactive refactoring:
- Place your cursor on any concrete type and select the “Add methods to X to implement an interface…” code action.
- A text entry field appears, inviting you to choose the name of an interface type. It makes dynamic queries to gopls to auto-complete names of types in your workspace and the standard library (for example, maphash.Hasher).
- If the selected interface has type parameters, gopls asks for a concrete type argument for each type parameter (such as Foo).
- Gopls generates complete method stubs with appropriate receiver names and instantiated method signatures.
type Foo struct{} type MyHasher struct{} // Equal implements [maphash.Hasher]. func (m *MyHasher) Equal(x Foo, y Foo) bool { panic("unimplemented") } // Hash implements [maphash.Hasher]. func (m *MyHasher) Hash(*maphash.Hash, Foo) { panic("unimplemented") }Moving declarations across files and packages (preview)
Moving declarations manually by cutting and pasting can easily break references and requires tedious import cleanup across multiple files. While scheduled for an upcoming gopls release, our working implementation already demonstrates how interactive file selection streamlines cross-file and cross-package moves:
- Place your cursor on any top-level declaration and select the “Move declaration X” code action.
- A file picker dialog lets you choose an existing destination .go file or specify a new file path.
- Gopls moves the declaration along with its dependent declarations (such as unexported helpers or methods) while leaving unrelated symbols in place, updates references across your workspace, and cleans up imports in both the source and destination files.
In the example below, we move the type Foo from package from to package to. Its method Print and the unexported constant bar, which only Foo uses, move along with it, while the unrelated function Baz stays behind:
// from/from.go package from import ( "fmt" "strings" ) const bar = "bar" // Doc comment for Foo type Foo struct{} func (f Foo) Print() { fmt.Println(bar) } func Baz() string { return strings.ToUpper("baz") } // from/from.go package from import "strings" func Baz() string { return strings.ToUpper("baz") } // to/to.go package to import "fmt" const bar = "bar" // Doc comment for Foo type Foo struct{} func (f Foo) Print() { fmt.Println(bar) }Slaying the dragon (gopls v0.24.0)
As a demonstration of multi-step interactive dialogs and a self-contained test case for client editor implementations, gopls v0.24.0 offers a “Slay the dragon” code action when you place your cursor on a package-level variable named dragonSlayer (for example, var dragonSlayer string). Happy hunting!
What’s on the Horizon
Interactive refactoring establishes a foundational capability in gopls, opening up several exciting directions on our roadmap:
- Change signature refactoring (#38028): Adding, removing, or reordering function parameters across a workspace requires input that cannot be deduced from syntax alone, such as the new parameter order or the default argument expression to insert at existing call sites. Interactive forms allow gopls to collect these details before rewriting the declaration and all call sites.
- Interactive conflict resolution: When a code transformation encounters naming collisions, identifier shadowing, or ambiguous references, gopls can ask the user for guidance, such as asking for permission to proceed or offering to rename conflicting symbols on the fly.
- Interactive commands beyond code edits: Because interactivity is modeled at the LSP command layer, it naturally generalizes to non-edit server operations that require user configuration, such as configuring test or benchmark runs with profiling flags (CPU, memory, tracing).
Getting Started and Sharing Feedback
Interactive refactoring is available in gopls v0.24.0 and vscode-go v0.56.0 (with proof-of-concept client integrations also explored for Neovim and Emacs).
We would love to hear your thoughts as we continue refining interactive code actions in gopls:
- For general feedback or feature requests, file an issue on the Go issue tracker.
- To read the full technical specification—including the stateless form protocol design and alternative approaches we explored—or to join the discussion with the broader LSP community, check out the LSP Interactive Code Actions design document and the ongoing conversation in microsoft/language-server-protocol#1164.
(Special thanks to Alan Donovan, Alex Putman, Brian Wilkerson, Danny Tuppeny, Hana Kim, Madeline Kalil, Peter Weinberger, and Robert Findley for their insights, discussions, feedback, and collaboration on this work.)
Happy refactoring!
Original source - Oct 14, 2026
- Date parsed from source:Oct 14, 2026
- First seen by Releasebot:Oct 14, 2026
Better HTTP/1 connection reuse
Go 1.27 improves HTTP/1 connection reuse by automatically draining unread response bodies in the background, helping requests avoid costly reconnections and run faster while keeping client code simple.
Nicholas Husin and Damien Neil
14 October 2026Take a look at the following function:
func getStatus(url string) (int, error) { resp, err := http.Get(url) if err != nil { return 0, err } defer resp.Body.Close() return resp.StatusCode, nil }It sends a GET request to url and returns the HTTP status code.
Using HTTP/1 (GODEBUG=http2client=0), calling this function 100 times against index.golang.org takes ~710 milliseconds on Go 1.26 on my machine. On Go 1.27, the same program takes ~150 milliseconds.
That is almost 5 times faster! How is such a drastic performance difference possible?
The cost of establishing HTTP connections
To understand the difference, consider what happens on the network when we make an HTTP request.
Go’s net/http package supports HTTP/1.0, HTTP/1.1, and HTTP/2. All three run over TCP, and usually over TLS when talking to HTTPS endpoints. Making a request over a new connection looks something like this:
- TCP handshake (1 RTT): the client sends a SYN packet, the server replies with SYN-ACK, and the client replies with ACK. Because the client can send the first TLS message alongside that final ACK, establishing the TCP connection takes 1 round-trip time (RTT).
- TLS handshake (2 RTT): next, a TLS handshake exchanges encryption keys and verifies the server’s identity; using TLS 1.2, this takes 2 RTT.
- HTTP request: with the keys exchanged, HTTP requests can finally be sent after a total of 3 RTT.
These round trips (plus some CPU time spent on TLS handshakes) add up quickly. In cross-region communications, one-way latencies often reach or exceed the 50 ms (100 ms RTT) shown in the diagram above. Compared to the 300 ms spent just setting up the connection, the HTTP request itself can be cheap to serve, taking only a little over 1 RTT when bandwidth is plentiful or the HTTP response is small.
Even in more favorable conditions, opening a new connection can still be expensive. Our opening benchmark queries index.golang.org, which is distributed worldwide and supports TLS 1.3. This means that latency is relatively low, and the TLS handshake can actually finish in just 1 RTT. Even so, the performance difference is still very noticeable.
Connection reuse
To avoid paying this setup cost on every request, HTTP clients and servers try to reuse existing connections across multiple requests when possible. The mechanics of this differ based on the HTTP version:
- HTTP/1.0: while not part of the official specification, clients and servers often opt into connection reuse by sending a Connection: keep-alive header. Reuse continues until either endpoint omits the header or sends a Connection: close header.
- HTTP/1.1: connections are persistent by default, and can be reused for subsequent requests and responses unless either side declares otherwise by sending a Connection: close header.
- HTTP/2: multiple requests and responses can be multiplexed over a single TCP connection.
When connection reuse fails
In HTTP/1 (both HTTP/1.0 and HTTP/1.1), multiple requests and responses on the same connection are sent sequentially on the wire. If two GET requests are sent to index.golang.org over the same TCP connection, the responses arrive as a single stream of bytes:
As shown in the diagram, net/http.Get reads and parses the status line and headers from the byte stream to populate net/http.Response, then returns immediately. The response body remains unread on the connection and is consumed only as the caller reads from net/http.Response.Body.
Because responses are sent back-to-back on the same stream, net/http can only find the start of the next response after the current response body has been read to the very end (as determined by the Content-Length or Transfer-Encoding header).
Now look back at our example program, where we never read resp.Body:
func getStatus(url string) (int, error) { resp, err := http.Get(url) if err != nil { return 0, err } defer resp.Body.Close() return resp.StatusCode, nil }Through Go 1.26, when resp.Body.Close is called, net/http sees that there is still an unread response body. Realizing that it cannot reuse the connection, it abandons the existing connection and creates new connections for its next requests, causing it to repeatedly incur the cost of establishing new connections.
(HTTP/2 does not have this problem. Because it multiplexes streams of frames over a single connection rather than sending responses strictly back-to-back, an unread response body on one stream does not block other requests from sharing the connection.)
Where failed connection reuse hurts
This subtlety of HTTP/1 connection reuse can cause silent performance degradation in seemingly innocuous code.
As in our opening example, a client might only care about an API response’s status code. However, the API endpoint it is talking to might send bodies that provide more detailed but ultimately unused information, such as {"success": true, "message": "update processed"}. This will unfortunately cause connection reuse to fail.
Even programs that do read the response body can run into this issue if they stop just short of the end of the body. For example, encoding/json.Decoder stops reading as soon as it sees the closing } of a JSON object. If a server sends a JSON response terminated with a newline, decoding the JSON object will leave the newline still unread. The connection cannot be reused for a new request until that newline is consumed. Thus, a healthy connection might end up being abandoned, even though it was only a single byte away from being reusable.
The manual solution
The unread body problem has been a long-standing sharp edge. Over the years, many Go developers came up with their own workarounds. Most commonly, this is done by draining the response body prior to closing it:
func getStatus(url string) (int, error) { resp, err := http.Get(url) if err != nil { return 0, err } drainAndCloseBody(resp.Body) return resp.StatusCode, nil } func drainAndCloseBody(body io.ReadCloser) { io.Copy(io.Discard, body) // Drain the response body before closing it. body.Close() }While this works for small responses, if the unread body is large, establishing a new TCP connection can be faster than downloading and discarding the rest of the body. A better approach is to cap the number of bytes we are willing to drain:
func drainAndCloseBody(body io.ReadCloser) { io.CopyN(io.Discard, body, 256<<10) // Only drain up to 256 KB. body.Close() }However, a server might send a response body that trickles in slowly, so we also need to cap the time we spend draining:
func drainAndCloseBody(body io.ReadCloser) { drainDone := make(chan struct{}, 1) go func() { io.CopyN(io.Discard, body, 256<<10) // Only drain up to 256 KB. drainDone <- struct{}{} }() // Only spend at most 50 ms trying to drain the response body. select { case <-drainDone: case <-time.After(50 * time.Millisecond): // If we reach the 50 ms timeout, body.Close will run and interrupt the // io.CopyN, preventing goroutine leaks. } body.Close() }Of course, we also do not want to block for up to 50 milliseconds when closing a response body. Instead, we can drain the body asynchronously in the background and let it race against subsequent requests:
func drainAndCloseBody(body io.ReadCloser) { drainDone := make(chan struct{}, 1) go func() { io.CopyN(io.Discard, body, 256<<10) // Only drain up to 256 KB. drainDone <- struct{}{} }() go func() { // Only spend at most 50 ms trying to drain the response body. select { case <-drainDone: // If the drain can finish before a new request is sent, the // connection will be reused; otherwise, a new connection is // created, and the current connection will be put in a pool of // idle connections, potentially being reused for another future // request. case <-time.After(50 * time.Millisecond): // If we reach the 50 ms timeout, body.Close will run and interrupt // the io.CopyN, preventing goroutine leaks. } body.Close() }() }As we can see, draining response bodies safely is surprisingly tricky and cumbersome. Worse, as the practice of draining response bodies spread, some nuances were often lost. This has led to misunderstandings such as attempting to drain response bodies for HTTP/2 connections, when doing so is unnecessary.
The current state and conclusion
Starting in Go 1.27, net/http.Transport automatically does everything we have implemented in the code above: it will asynchronously drain an unread HTTP/1 response body for up to 50 ms or 256 KB. It also implements additional optimizations; for example, when a response contains the Connection: close header, draining the body is guaranteed to be wasted work, and it therefore skips doing so. Note that this behavior might evolve in future versions of Go, as other possible enhancements become apparent.
As a general best practice, we now recommend that users simply close their HTTP bodies once they no longer need them, like in our original example:
func getStatus(url string) (int, error) { resp, err := http.Get(url) if err != nil { return 0, err } defer resp.Body.Close() return resp.StatusCode, nil }Go is all about simplicity. Let your code stay clean and simple, and let net/http deal with the complexities on your behalf.
Original source - Oct 8, 2026
- Date parsed from source:Oct 8, 2026
- First seen by Releasebot:Oct 11, 2026
[security] Vulnerabilities in golang.org/x/net
Go releases golang.org/x/net v0.60.0 with key HTTP/2 security fixes, including protections against trailer-based memory exhaustion, excessive CPU use from repeated window updates, double flow control refunds, and an HPACK encoder race that could crash servers.
Hello gophers,
We have tagged version v0.60.0 of golang.org/x/net in order to address the following security issues:
- net/http: HTTP/2 server memory exhaustion due to Trailer headers
When "Trailer" headers are sent by a client, the HTTP server internally uses the header values to populate the Request.Trailer map passed to the server handler. Because Request.Trailer is a map, each entry incurs memory overhead. For HTTP/2 servers, a malicious client can exploit this by sending a "Trailer" header that declares a large number of fields, causing the server to allocate a disproportionate amount of memory while bypassing Server.MaxHeaderValueCount and Server.MaxHeaderBytes limits. This exploit is not applicable for HTTP/1 servers, which do not support multiplexing a large number of requests over one TCP connection, and whose Server.MaxHeaderBytes are calculated differently. Server.MaxHeaderValueCount and Server.MaxHeaderBytes limits are now applied towards the trailer fields declared in "Trailer" headers. Thanks to RyotaK (https://ryotak.net) of GMO Flatt Security Inc. for reporting this issue. This is CVE-2026-78659 and Go issue https://go.dev/issue/81857.
- net/http: excessive CPU consumption from repeated initial window changes
A malicious HTTP/2 peer could cause excessive CPU consumption in the client or server by opening a large number of streams and then sending many small SETTINGS frames containing SETTINGS_INITIAL_WINDOW_SIZE values. The HTTP/2 client and server now efficiently handle changes to the initial window size (O(1) rather than O(number of streams)). Thanks to Jakub Ciolek (https://ciolek.dev) for reporting this issue. This is CVE-2026-78669 and Go issue https://go.dev/issue/81742.
- net/http: double flow control refund on HTTP/2 server streams
The HTTP/2 server could refund connection-level flow control twice for the same data: Once when a client resets a stream (refunding data for any sent-but-unread portion of the stream), and again when a request handler reads the buffered data. A malicious client could exploit this to bypass the configured connection-level flow control limit (MaxReceiveBufferPerConnection). Total buffered data is still limited by the concurrent stream limit and stream-level flow control. The HTTP/2 server now waits to refund connection-level flow control for reset streams until after the request handler is complete. Thanks to Ali Sherif (https://www.linkedin.com/in/ali-sherif-13812b276/) for reporting this issue. This is CVE-2026-78663 and Go issue https://go.dev/issue/81743.
- net/http: HTTP/2 server crash due to HPACK encoder race
HTTP/2 servers could end up crashing due to inadvertently modifying its HPACK encoder concurrently. This happens because the server modifies the HPACK encoder from two goroutines without synchronization: one uses the encoder to encode a HEADERS frame as part of a response sent to a client and the other modifies the encoder's table size when handling a SETTINGS frame containing SETTINGS_HEADER_TABLE_SIZE that a client sends. A malicious client can repeatedly send a request while changing the header table size to crash the server. Fix this issue by not applying SETTINGS_HEADER_TABLE_SIZE immediately. Instead, buffer any SETTINGS_HEADER_TABLE_SIZE received, and only apply the new value prior to the next time the server writes a frame. Thanks to RyotaK (https://ryotak.net) of GMO Flatt Security Inc. for reporting this issue. This is CVE-2026-97032 and Go issue https://go.dev/issue/81867.
Cheers,
Go Security team
Original source - Oct 8, 2026
- Date parsed from source:Oct 8, 2026
- First seen by Releasebot:Oct 11, 2026
[security] Go 1.27.2 and Go 1.26.9 are released
Go releases 1.27.2 and 1.26.9, delivering 15 security fixes that harden HTTP/2, HTTP/1, crypto/tls, html/template, cmd/go, and os against crashes, memory exhaustion, request smuggling, checksum bypasses, and other security issues.
Hello gophers,
We have just released Go versions 1.27.2 and 1.26.9, minor point releases.
These releases include 15 security fixes following the security policy:
net/http: HTTP/2 server crash due to HPACK encoder race
HTTP/2 servers could end up crashing due to inadvertently
modifying its HPACK encoder concurrently. This happens because the
server modifies the HPACK encoder from two goroutines without
synchronization: one uses the encoder to encode a HEADERS frame as part
of a response sent to a client and the other modifies the encoder's
table size when handling a SETTINGS frame containing
SETTINGS_HEADER_TABLE_SIZE that a client sends. A malicious client can
repeatedly send a request while changing the header table size to crash
the server.
Fix this issue by not applying SETTINGS_HEADER_TABLE_SIZE immediately.
Instead, buffer any SETTINGS_HEADER_TABLE_SIZE received, and only apply
the new value prior to the next time the server writes a frame.
Thanks to RyotaK (https://ryotak.net) of GMO Flatt Security Inc. for reporting this issue.
This is CVE-2026-97032 and Go issue https://go.dev/issue/81867.net/http: HTTP/2 server memory exhaustion due to Trailer headers
When "Trailer" headers are sent by a client, the HTTP server internally
uses the header values to populate the Request.Trailer map passed to the
server handler. Because Request.Trailer is a map, each entry incurs
memory overhead. For HTTP/2 servers, a malicious client can exploit this
by sending a "Trailer" header that declares a large number of fields,
causing the server to allocate a disproportionate amount of memory while
bypassing Server.MaxHeaderValueCount and Server.MaxHeaderBytes limits.
This exploit is not applicable for HTTP/1 servers, which do not support
multiplexing a large number of requests over one TCP connection, and
whose Server.MaxHeaderBytes are calculated differently.
Server.MaxHeaderValueCount and Server.MaxHeaderBytes limits are now
applied towards the trailer fields declared in "Trailer" headers.
Thanks to RyotaK (https://ryotak.net) of GMO Flatt Security Inc. for reporting this issue.
This is CVE-2026-78659 and Go issue https://go.dev/issue/81857.crypto/tls: reject malformed ECH outer extension references
Multiple ECH outer extension references are not
permitted under RFC 9849; previously, a client
could send a well-crafted packet that could
trigger memory exhaustion in the server process
by specifying multiple references.
We now reject these as malformed and curb the
memory amplification vector as a result.
This is CVE-2026-97031 and Go issue https://go.dev/issue/81855.cmd/go: checksum bypass for golang.org/fips140
Previously, a user operating inside of a malicious
Go project that defines a bogus golang.org/fips140
and operates a malicious GOMODPROXY the user chooses
to connect to can serve an arbitrary module in its
place.
We now unpack the trusted ziphash for the bundled
golang.org/fips140 module and construct its entry
in the GOMODCACHE such that it can be verified by
the toolchain.
This is CVE-2026-94444 and Go issue https://go.dev/issue/81833.cmd/go: checksum database bypass for golang.org/toolchain
Previously, a user operating inside of a malicious
Go project that defines a bogus golang.org/toolchain
go.sum entry and operates a malicious GOMODPROXY the
user chooses to use can bypass the intended checksum.
We now ensure that golang.org/toolchain always goes
to the network for the canonical checksum.
This is CVE-2026-94447 and Go issue https://go.dev/issue/81834.html/template: reset context tracking on consecutive template expressions
When a JavaScript template literal contains
consecutive expressions, the context tracking
state was not properly reset upon entering a
new expression.
We now ensure that template-literal expression
entries correctly reset context variables so all
subsequent regular expression literals are
accurately recognized and escaped.
This is CVE-2026-94448 and Go issue https://go.dev/issue/81821.html/template: recognize yield as regexp preceder keyword
A trusted template author may have previously
written a valid template wherein the use of
the yield keyword would not be correctly
escaped.
We now ensure that valid keyword uses are
escaped and non-keyword uses are not escaped.
This is CVE-2026-97030 and Go issue https://go.dev/issue/81823.net/textproto, mime/multipart: memory limit bypass when parsing MIME headers
Parsing a multipart form could bypass memory limits and read an
arbitrarily long line into memory when the remaining limit at the
start of a part was less than 400 bytes.
Multipart form memory limits are now properly enforced in this situation.
Thanks to Jakub Ciolek (https://ciolek.dev) for reporting this issue.
This is CVE-2026-94440 and Go issue https://go.dev/issue/81741.net/http: HTTP/1 client connection desynchronization after CONNECT rejection
When http.Transport sends an HTTP/1 CONNECT request with a non-empty
Request.Body, it writes the body directly to the connection without
framing after the request headers. If the server rejects the CONNECT
request with a non-2xx keep-alive response, Transport returns the
connection to the idle pool. Because CONNECT requests do not have a
request body, the server may interpret the trailing body bytes as a
subsequent pipelined HTTP/1.1 request on the connection, leaving the
pooled connection desynchronized and causing the next caller that reuses
it to read the response to the injected request. In reverse proxies
(including httputil.ReverseProxy) that forward CONNECT requests through
a shared Transport, this can lead to cross-user response poisoning.
The HTTP/1 transport now closes a connection after sending a CONNECT
request, regardless of the response status.
In addition, ReverseProxy now rejects incoming CONNECT requests
with a 405 Method Not Allowed response. ReverseProxy has never handled
CONNECT requests in a useful fashion (it does not convert the
connection into a bidirectional tunnel), so we do not expect this
change to negatively affect any current users.
Thanks to Xclow3n (Rajat Raghav) for reporting this issue.
This is CVE-2026-56866 and Go issue https://go.dev/issue/81740.net/http: HTTP/1 server connection desynchronization after 2xx CONNECT response
When an HTTP server handler sent a 2xx response to an HTTP/1 CONNECT request
and returned without hijacking the connection, the server improperly continued
to read and serve requests from the connection. Since a 2xx response to an
HTTP/1 CONNECT converts the connection into a tunnel, the server should not
treat the connection as continuing to contain HTTP.
The impact of this misbehavior is mostly limited to potential request smuggling,
where an intermediate proxy considers the data on the connection to be tunneled
and the server considers it to be HTTP.
The HTTP/1 server now always closes a connection after responding to a CONNECT
request, regardless of the response status.
Thanks to Jakub Ciolek (https://ciolek.dev) for reporting this issue.
This is CVE-2026-94439 and Go issue https://go.dev/issue/81744.net/http: excessive CPU consumption from repeated initial window changes
A malicious HTTP/2 peer could cause excessive CPU consumption in the
client or server by opening a large number of streams and then sending
many small SETTINGS frames containing SETTINGS_INITIAL_WINDOW_SIZE values.
The HTTP/2 client and server now efficiently handle changes to the
initial window size (O(1) rather than O(number of streams)).
Thanks to Jakub Ciolek (https://ciolek.dev) for reporting this issue.
This is CVE-2026-78669 and Go issue https://go.dev/issue/81742.net/http: HTTP/2 transport accepts malformed framing-related headers
Historically, we have been rather lax about malformed framing-related
headers in our HTTP/2 implementation, as they cannot interfere with
HTTP/2 framing. However, this makes it possible for our HTTP/2
implementation to forward responses containing such headers to an HTTP/1
client when acting as a reverse proxy. If the HTTP/1 client also does
not behave strictly enough, this can result in response smuggling.
We now delete malformed framing-related headers when received by our
HTTP/2 transport, so they will not be forwarded to a potentially
vulnerable HTTP/1 client.
Thanks to TJ Barton for reporting this issue.
This is CVE-2026-78660 and Go issue https://go.dev/issue/81115.os: Root.Mkdir(All) can follow junctions out of the root on Windows
On Windows, when the target of Root.Mkdir or Root.MkdirAll was a junction
pointing to an empty location, the operation would create a directory at
the junction target even when that target was located outside the root.
This only applies to operations where the last path component is a
junction (path/to/junction, but not path/junction/target).
Root.Mkdir and Root.MkdirAll now correctly avoid resolving junctions.
Thanks to Daniele Ballarini for reporting this issue.
This is CVE-2026-56857 and Go issue https://go.dev/issue/81739.net/http: lack of limit on size of parsed Range headers
When parsing a Range header containing a large number of small ranges,
FileServer(FS), ServeContent, and ServeFile(FS) could consume an excessive
amount of CPU.
These functions now ignore Range headers containing more than 200 ranges.
The limit is controlled by the new httpservecontentmaxranges=
GODEBUG setting. Setting GODEBUG=httpservecontentmaxranges=0
disables the limit.
Thanks to Jakub Ciolek (https://ciolek.dev) for reporting this issue.
This is CVE-2026-78667 and Go issue https://go.dev/issue/81858.net/http: double flow control refund on HTTP/2 server streams
The HTTP/2 server could refund connection-level flow control twice for the same data:
Once when a client resets a stream (refunding data for any sent-but-unread portion
of the stream), and again when a request handler reads the buffered data.
A malicious client could exploit this to bypass the configured connection-level
flow control limit (MaxReceiveBufferPerConnection). Total buffered data is still
limited by the concurrent stream limit and stream-level flow control.
The HTTP/2 server now waits to refund connection-level flow control for reset
streams until after the request handler is complete.
Thanks to Ali Sherif (https://www.linkedin.com/in/ali-sherif-13812b276/) for reporting this issue.
This is CVE-2026-78663 and Go issue https://go.dev/issue/81743.
View the release notes for more information:
https://go.dev/doc/devel/release#go1.27.2You can download binary and source distributions from the Go website:
https://go.dev/dl/To compile from source using a Git clone, update to the release with
git checkout go1.27.2 and build as usual.Thanks to everyone who contributed to the releases.
Cheers,
Original source
Dmitri and Michael for the Go team - Oct 5, 2026
- Date parsed from source:Oct 5, 2026
- First seen by Releasebot:Oct 6, 2026
[security] Go 1.27.2 and Go 1.26.9 pre-announcement
Go plans minor releases with private standard library security fixes for several CVEs.
Hello gophers,
We plan to issue Go 1.27.2 and Go 1.26.9 during US business hours on Thursday, October 8.
These minor releases include PRIVATE security fixes to the standard library, covering the following CVEs:
- CVE-2026-97032
- CVE-2026-78659
- CVE-2026-97031
- CVE-2026-94440
- CVE-2026-56866
- CVE-2026-94439
- CVE-2026-78669
- CVE-2026-56857
- CVE-2026-78667
- CVE-2026-78663
Following our security policy, this is the pre-announcement of those releases.
Thanks,
Original source
The Go team - Oct 2, 2026
- Date parsed from source:Oct 2, 2026
- First seen by Releasebot:Oct 4, 2026
Arch-specific SIMD in Go
Go adds experimental SIMD support for arm64 and wasm in Go 1.27, expanding the archsimd API beyond amd64. It brings clearer vector, mask, and type-conversion primitives for faster low-level code across supported architectures.
Since Go 1.26, we have supported an experimental amd64 SIMD API. Now in Go 1.27, we support two more architectures: arm64 and wasm.
The new APIs can be accessed by setting
GOEXPERIMENT=simdwhen building a program. They are defined in thesimd/archsimdpackage.archsimd is the lower-level infrastructure that simd builds on, essentially the intrinsics layer in other languages. For exotic operations that only exist on a specific architecture, users can access them by transitioning from simd to archsimd (via
ToArchand<Types>FromArch). For details, please refer to the simd blog post.For readers with prior knowledge of SIMD intrinsics in other languages, you might find that our archsimd API does not directly mirror the underlying hardware instructions:
- We give our APIs sensible names: e.g., instead of _mm512_slli_epi64, we just call it ShiftAllLeft.
- We leave some architecture details to compiler optimizations rather than exposing them in the API: e.g., instead of _mm512_maskz_add_ps(m, x, y), we optimize
x.Add(y).Masked(m)into the same instruction.
These design decisions make our APIs smaller and more accessible, and they also happily make the simd implementation much easier.
For readers without prior knowledge of SIMD intrinsics, we hope our low-level API is a natural and pleasant journey for you.
Please share your feedback and comments. Anything about usability, performance, etc., is appreciated. The parent issue for this project is #73787.
What is SIMD
SIMD stands for Single Instruction, Multiple Data. SIMD instructions operate on wide registers (128-bit, 256-bit, or more) containing multiple 8- to 64-bit elements, performing operations across all elements in parallel. Wider registers and parallel execution provide a significant performance boost to algorithms that can take advantage of them.
Until now, anyone who wanted to use SIMD in Go had to endure the friction of writing assembly language. The new archsimd package is here to change that.
Goals
The goal is to support as many SIMD instructions across different architectures as possible. Currently, we have amd64, arm64, and wasm available. Our amd64 support has the largest API surface, covering AVX, AVX2, and many AVX-512 extensions. Our arm64 support currently covers NEON, with SVE and some SVE2 already on the way. Our wasm support is also mostly complete, thanks to its well-defined 128-bit SIMD abstraction.
Some users might be interested in matrix extensions on certain architectures, such as AMX and SME. We haven’t fully settled on how to represent matrices effectively in Go, so they are not yet supported, but we might support them in the future.
API Design and Naming
Types
The architecture-specific SIMD API is imported from
simd/archsimd.archsimd uses distinct struct types, such as
Float32x4,Int32x8, orUint8x16, to signal the shape and element type of each vector, and defines operations as methods on those types. At this moment, archsimd supports only fixed-width vector extensions. Scalable vector extensions like arm64 SVE and RVV will have different struct types to represent vectors. Mask types also come with vector-like shapes, e.g.,Mask32x4.Methods
Across different vector widths, element types, and architectures, we use the same method name whenever operations are semantically identical:
- Regardless of vector width or architecture, element-wise addition is simply
x.Add(y); the type of x determines which instruction to emit. Instead of 18 different function names for addition, there is only one method name. - When instructions on different architectures look similar at a glance but differ in edge-case behavior, we give them distinct names so differences don’t silently bite you. For example, 16-byte table lookup on amd64 (VPSHUFB) zeros the output byte when the index is negative (index < 0) and wraps modulo 16 otherwise, so we call it PermuteOrZero. On arm64 NEON (VTBL) and wasm (i8x16.swizzle), any out-of-range index (index < 0 || index >= 16) zeros the output byte, so we call it LookupOrZero.
- On amd64, many 256-bit and 512-bit instructions operate independently within 128-bit lanes rather than across the entire register. We explicitly suffix those methods with Grouped (such as InterleaveLoGrouped or PermuteOrZeroGrouped) to make the 128-bit lane boundary obvious.
Methods require a receiver value, which doesn’t work for creating a vector from memory or a scalar. For those, archsimd provides package-level functions named with the target vector type:
- Slices (the default): In Go 1.27, loading and storing slices use the shortest names:
archsimd.LoadFloat32x4(s []float32) Float32x4andx.Store(s []float32). For tail elements that may be shorter than a full vector,archsimd.LoadFloat32x4Part(s []float32) (Float32x4, int)zero-fills the remaining lanes and returns the number of elements loaded, paired withx.StorePart(s []float32) int. - Arrays and Broadcasts: Fixed-size array pointers use the Array suffix (
archsimd.LoadFloat32x4Array(y *[4]float32)andx.StoreArray(y *[4]float32)), andarchsimd.BroadcastFloat32x4(v float32)broadcasts a scalar to all lanes.
Type Reinterpretation
Reinterpretations are type casts without any cost. SIMD algorithms frequently reinterpret bits across element types and widths.
In the Go 1.26 experiment, we implemented this with As methods, which suffered from a quadratic explosion of type pairs and couldn’t generalize to width-agnostic vectors in simd or SVE.
In Go 1.27, we replace them with composable zero-cost conversions:
ToBits()reinterprets a signed integer or float vector as an unsigned integer vector of the same element width (e.g.,Int32x4.ToBits() -> Uint32x4), andBitsToInt32()/BitsToFloat32()converts back.ReshapeToUint<W>s()on unsigned vectors changes the element width within the same register width. For example, if x is anarchsimd.Uint8x16, thenx.ReshapeToUint32s().BitsToFloat32()reinterprets the bits of x as anarchsimd.Float32x4at zero runtime cost.
Masks
Different architectures encode vector masks very differently, e.g. k mask registers on AVX-512, full vector bitmasks on AVX/AVX2, NEON, and wasm, and predicate registers on SVE. To hide this hardware detail, archsimd provides opaque Mask types (such as
Mask32x4) matching each vector shape:- Comparisons like
x.Greater(y)produce a Mask. x.Masked(m)zeros elements where m is false, andx.IfElse(m, y)(which replaces Merge from Go 1.26) selects elements from x where m is true and from y where m is false.- The compiler peepholes mask operations with the surrounding instructions: on AVX-512,
x.Add(y).Masked(m)orx.Add(y).IfElse(m, z)compiles into a single zero-masked or merge-masked VPADD instruction; on AVX2, NEON, or wasm, it lowers to the appropriate bitwise AND or blend/bitselect instruction.
Examples
Portable algorithms like inner product can easily be implemented using the portable simd package, as shown in the companion simd blog post. However, we still expose archsimd to tap into exotic, architecture-specific instructions that do not fit into a portable intersection API, or instructions that can simply do things faster than what simd provides.
On amd64, the GFNI extension exposes GaloisFieldAffineTransform operations. Putting aside what a Galois Field is, these operations do a simple thing:
// Each element of A is interpreted as a matrix of 8 rows of vectors of 8 bits. // Each element of x is interpreted as a vector of 8 bits. // The b argument is likewise a vector of 8 bits. // The result is z[i] = (A[i/8] * x[i]) + b. // // The matrix * and vector + follow the usual rules for linear algebra, // but based on AND and XOR for scalar * and + // // Asm: VGF2P8AFFINEQB, CPU Feature: AVX512GFNI func (x Uint8x16) GaloisFieldAffineTransform(A Uint64x2, b uint8) Uint8x16Each 8x8 bit matrix A is packed row-by-row into a single uint64. Because any linear combination or permutation of the 8 bits within a byte can be written as an 8x8 bit matrix, this single instruction is a Swiss Army knife for byte-level bit manipulation.
For example, reversing the bit order of every byte (bits.Reverse8) normally requires nibble lookup tables, masks, shifts, and ORs in SIMD. With GaloisFieldAffineTransform, we can simply multiply each byte by the 8x8 anti-diagonal identity matrix (0x8040201008040201) to reverse all 8 bits of 64 bytes at a time in a single instruction.
Another example is matrix transpose. On amd64, the permutation instructions are shaped in a non-portable way, so using simd is cumbersome and might incur emulations. An efficient implementation can be written more directly in archsimd. The example below transposes an 8-by-8 matrix of 32-bit integers in registers on amd64 using AVX2’s 128-bit lane-grouped interleaves (
InterleaveLoGrouped,InterleaveHiGrouped) and cross-lane permutations (ConcatPermuteScalarsGrouped,ConcatPermute128Scalars).Good Practices
When walking through the examples above, you might have a few questions:
- What is archsimd.X86.AVX512GFNI(), and can I omit it?
- Why is the strided loop written as i = 0; i < len(src)-v.Len()+1; i += v.Len(), instead of i = 0; i + v.Len() <= len(src); i += v.Len()?
- Why does Transpose8 take 8 vector parameters rather than a struct or an [8]archsimd.Int32x8 array?
At first glance these choices might look like minor stylistic preferences, but each of them is chosen for an important performance or correctness reason:
- CPU feature checks (archsimd.X86., archsimd.ARM64.)
On amd64, we provide runtime feature checks like archsimd.X86.AVX(), AVX2(), AVX512(), and extension checks like AVX512GFNI() or AVX512VNNI(); on arm64, NEON is always available, and we provide checks for optional extensions like archsimd.ARM64.PMULL(), SVE(), and SVE2(). The compiler doesn’t know ahead of time whether the machine running your binary supports optional SIMD extensions. If you don’t guard your SIMD code with the appropriate feature check, your program may crash with SIGILL on hardware that lacks the instruction.
Just as importantly, CPU feature checks act as compiler optimization hints. For example, AVX-512 supports hardware merge-masking on instruction outputs. How the compiler lowers x.Add(y).IfElse(m, z) on a 128-bit or 256-bit vector depends on which CPU features are known to be available. If the code is not guarded by archsimd.X86.AVX512(), the compiler must conservatively emit a vector VPADD followed by a VPBLEND instruction. Inside an if archsimd.X86.AVX512() block, however, the compiler knows AVX-512 is available and fuses the sequence into a single merge-masked AVX-512 VPADD instruction. - Bounds check elimination in strided loops
How you write the loop bound determines whether the compiler’s prove pass can eliminate slice bounds checks inside the loop. In i + v.Len() <= len(src), the addition i + v.Len() could theoretically overflow to a negative int if len(src) were near math.MaxInt, which prevents the compiler from proving that i is always non-negative and in-bounds. Writing i < len(src)-v.Len()+1 avoids that potential overflow, allowing the loop body to compile with zero bounds checks. - Keeping vectors in registers (avoiding large composite types)
Transpose8 passes 8 vector parameters rather than a struct of 8 fields or an [8]archsimd.Int32x8 array because Go’s ABI and SSA backend currently place large composite types in memory rather than in registers (a known issue tracked at #24416). Because SIMD vectors are 16 to 64 bytes each, spilling them to the stack hurts performance much more than spilling scalar values. This applies to both function parameters and local variables, so avoid wrapping SIMD vectors inside large arrays or structs in hot loops. There are ongoing efforts to promote composite memory accesses back into registers, which have not yet landed in Go 1.27.
Trying it out
In Go 1.27,
GOEXPERIMENT=simdsupports amd64 (AVX, AVX2, and AVX-512), arm64 (NEON), and wasm (WebAssembly 128-bit SIMD) out of the box. Whether you are on an Intel/AMD machine, an arm64 server or Apple Silicon Mac (M1/M2/M3/M4), or targeting WebAssembly, you can try archsimd natively right away:GOEXPERIMENT=simd go test simd/archsimd/...You can also cross-test wasm (or amd64 via Rosetta emulation on Apple Silicon) by setting GOARCH:
# Run wasm SIMD tests using a WASI runtime: GOOS=wasip1 GOARCH=wasm GOEXPERIMENT=simd go test simd/archsimd/... # Or run amd64 AVX2 tests on Apple Silicon via Rosetta: GOARCH=amd64 GOEXPERIMENT=simd go test simd/archsimd/...We’re interested in all sorts of feedback! Early users have already helped us catch bugs (such as #77582) and identify places where code generation or API ergonomics could be improved. We tried hard to pick clear, consistent names and cover the most useful instructions, but archsimd is a massive API surface and there is always room to improve.
Future work
For Go 1.28 and beyond, we are actively working on completing arm64 SVE and SVE2 support in archsimd (introducing width-agnostic scalable vector types like archsimd.Float32s backed directly by hardware SVE registers and predicates) and wiring it into simd. We also plan to expand archsimd to additional architectures such as riscv64, ppc64, s390x, and loong64, improve register promotion for composite types, and continue filling in instructions and compiler optimizations based on community feedback.
Original source - Sep 24, 2026
- Date parsed from source:Sep 24, 2026
- First seen by Releasebot:Sep 25, 2026
Platform-independent SIMD in Go
Go introduces an experimental portable SIMD package that brings near-assembly performance to vectorized code across amd64, arm64, and wasm. It adds a platform-agnostic API, emulation for unsupported targets, and a simpler path for high-performance data processing.
Go 1.26 and 1.27 include experimental APIs for Single Instruction Multiple Data (SIMD) operations.
SIMD is a native feature of many modern CPUs that allows software to perform uniform operations across vectors of data very quickly, such as adding 8 pairs of float64 values in a single instruction. It can significantly speed up many computationally-intensive tasks, ranging from cryptography to data processing to AI. In fact, Go’s Green Tea garbage collector even makes use of SIMD to accelerate scanning memory for live objects.
Prior to these new experimental APIs, the only way to access this functionality from Go was by writing Go assembly. This was only worth it for truly performance-critical compute kernels, which meant plenty of software that could benefit from SIMD simply left a lot of the CPU unused.
Go 1.26 introduced a SIMD API for amd64, and Go 1.27 added APIs for arm64 (specifically NEON) and wasm. However, a basic challenge for a SIMD API is the enormous variation between platforms, not simply in what operations they support, but even in how vectors are represented. Some platforms provide fixed-size vectors, typically between 128 bits and 512 bits, while on others the vector size isn’t known at build time and must be queried when the program starts. To provide full access to the breadth of these platforms, these APIs live in an architecture-dependent archsimd package.
But Go 1.27 goes beyond these architecture-dependent APIs and introduces an experimental, fully portable, platform- and size-agnostic SIMD interface, loosely based on Highway for C++. The goal is to support write-once near-asm-performance “simd” code on platforms with SIMD support, and to provide a competent emulation on those platforms that do not (yet) have SIMD support. The simd package currently supports AVX, AVX2, and AVX512 on amd64, NEON on arm64, and wasm’s SIMD instructions.
Motivation: variation among SIMD architectures
SIMD architectures vary in several dimensions. Some provide a single fixed vector size (wasm, PowerPC, and s390x, 128 bits). Some provide several fixed vector sizes (amd64, with 128, 256, and 512; loong64 with 128 and 256). Riscv64 supports vectors of unspecified size between 128 and 65536 bits, though the length is limited to powers of 2. Arm64 supports one fixed size (128 bits, NEON), and one variable size (128-2048 bits, powers of two only, SVE). On a given instance of a particular architecture, determining what sizes that particular instance happens to support requires feature checks: amd64, but is it AVX, AVX2, or AVX512? Arm64, but is it NEON or SVE? If SVE, how large? Which variant of SVE: SVE, SVE2, or SVE2.1?
Different SIMD architectures vary in how they handle vector masking. For vectors, if-then-else across a vector can be implemented with masks; do the operation, but only assign the result (or load, or store) where the mask is “true”. Some SIMD variants do not provide masks; all operations work across all elements, and “masking” is done with vector bitmasks and vector boolean operations (wasm, AVX, AVX2, NEON). Some provide special mask registers, with one bit governing operations on one vector element (AVX512 and RVV). Others (SVE) allocate one bit per vector byte, but the least-significant bit of each element’s mask bits governs masked operations. AVX2 also supports masked loads and stores, but using a plain vector as the mask, and with the most-significant bit governing the operation.
A third source of variation is in the operations themselves. Each architecture provides its own primitives for rearranging vector elements; some require constant inputs, others support variable inputs. Different SIMD architectures support different crypto-related operations. Even basic arithmetic can have varying support; for example wasm lacks comparisons for vectors of 64-bit integers. Even for a given vector length on a particular architecture, instruction support depends on “features” that must be checked.
Even though Go’s architecture-dependent archsimd package was designed to be as uniform as possible across architectures, many of these quirks remain, and make designing, writing, and testing code for multiplatform SIMD onerous. We could do more in the archsimd package to make the different architectures appear more similar, but we can only go so far without compromising efficiency.
Overview
The new simd package hides these differences by removing fixed-size vectors from the type system, and by only supporting those operations that are in the intersection of all the different platforms, and fills gaps in the intersection with efficient emulation in terms of other SIMD instructions. The goal is a set of operations that is:
- adequate to support many data processing algorithms that benefit from a vectorized implementation (but are not tied to a particular vector size),
- is as efficient as assembly language when the source code operations match the underlying hardware,
- is otherwise emulated as well as possible,
- and is easy to read and understand (even/especially if an LLM ends up writing the code).
On platforms that lack SIMD instructions or that lack support in archsimd, all of the operations are emulated, so that code written using the simd package will always run.
To use this experimental package, set GOEXPERIMENT=simd at build time, just like using the experimental archsimd package.
The simd vector types are just capitalized, plural, primitive types, for example simd.Uint8s or simd.Float32s. Vectors are loaded from and stored to slices, for example:
// innerProduct returns the inner product of x and y. func innerProduct(x, y []float32) float32 { var a simd.Float32s var i int for i = 0; i < len(x)-a.Len()+1; i += a.Len() { u := simd.LoadFloat32s(x[i : i+a.Len()]) v := simd.LoadFloat32s(y[i : i+a.Len()]) a = u.MulAdd(v, a) } if i < len(x) { u, _ := simd.LoadFloat32sPart(x[i:]) v, _ := simd.LoadFloat32sPart(y[i:]) a = u.MulAdd(v, a) } return sum(a) } // sum returns scalar sum of elements of x. func sum(x simd.Float32s) float32 { s := make([]float32, x.Len()) x.Store(s) var r float32 for _, e := range s { r += e } return r }This example also shows one of the limitations of the first experimental release of this package; because there’s no common way to sum across all the elements of a vector, it’s not supported by simd in Go 1.27, though ReduceSum will appear in the next release so sum can be replaced with just simd.ReduceSum.
SIMD comparisons produce mask values, which are specific to the corresponding vector element width, so that comparisons of Int8s produce Mask8s, etc., and mask values can be used to select and filter vectors.
[The page continues with detailed tables of supported operations, examples of transitioning between platform-specific and portable SIMD code, GODEBUG settings to control SIMD behavior, implementation details about compiler AST rewriting for SIMD, and plans for future releases including adding SVE support and more SIMD operations in Go 1.28.]
Original source - Sep 16, 2026
- Date parsed from source:Sep 16, 2026
- First seen by Releasebot:Sep 17, 2026
Size-Specialized Memory Allocation
Go 1.27 improves allocation-heavy performance with faster small memory allocations, especially under 80 bytes. The runtime adds size-specialized malloc paths that speed up common 16 and 24 byte allocations, with fallback support and an option to disable the experiment if needed.
Go 1.27 includes faster memory allocation for allocations of fewer than 80 bytes.
Allocations can be up to 20-30% faster, making allocation-heavy programs up to 1% faster. The Go runtime improves the performance of those allocations by adding specialized functions that are used to allocate certain sizes. These specialized functions can then make certain assumptions that make them faster and easier to optimize. This blog post will explain how this works and how it makes your programs faster.
Heap allocations are created by the runtime’s mallocgc function, which requires the size of the allocation and whether it contains pointers. When the compiler determines that an object escapes to the heap or otherwise needs to be dynamically allocated, it inserts a call to newobject, which is a simple wrapper function that extracts the size of the object and whether it contains pointers and passes those to mallocgc.
These two pieces of information determine most of the work that the allocator needs to do. The size is important because the allocator defines ranges of sizes called “size classes”. For most allocations that are not too large and not too small, it will return a block of memory from a list of free objects that are all sized to the maximum size of the size class. So, for instance, size class 3 is 17-24 bytes. So whether you allocate 17 bytes or 24 bytes, the allocator will give you the next free 24 byte object available in its list of 24 byte objects. Below is a table of the size ranges of each of the size classes up to 80 bytes. There are separate sets of free lists, which we call spans, depending on whether the allocation has pointers, because of the bookkeeping we need to do for the garbage collector.
Size class | Range of sizes
1 | 1-8 bytes
2 | 9-16 bytes
3 | 17-24 bytes
4 | 25-32 bytes
5 | 33-48 bytes
6 | 49-64 bytes
7 | 65-80 bytesBecause the size class and whether the allocation contains pointers determine which span we allocate from, the allocator has a type called the span class, whose value encodes both: it’s defined as sizeClass<<1 | noPointers. When implementing size-specialized malloc it was clear that it made the most sense to specialize on these span classes because much of the behavior of the allocator was determined by the span class.
We generate a specialized mallocgc variant for every span class. For instance, the function that allocates pointer-free objects in size class 3 is called mallocgcSmallNoScanSC3. Small means not tiny or large, NoScan means it has no pointers, and SC3 means size class 3 (17-24 bytes). Specialized functions are designed to be as simple as possible and cannot handle every corner case during allocation. When they detect such a case, such as when the GC is active, they fall back to a more generic allocation routine.
So we end up with a new specialized mallocgc function for the tiny case (always no pointers) and one for each non-tiny span class: the non-pointer spans of size class 2 and above, and the pointer spans of size class 1 and above. These specialized mallocgc variants themselves are faster than calling mallocgc, but the benefits of specializing decrease as the sizes get larger: the allocation often gets dominated by needing to clear the memory, and at some point the rest of the work of allocation becomes negligible. And it’s not enough to just be faster than mallocgc! With size-specialized allocation, when the compiler knows which span class it needs to allocate for, it can directly insert a call to the specialized function instead of the call to newobject. But the compiler often doesn’t know which span class is being allocated when code is generated: think slices of dynamic length. Since the compiler can’t determine the size of the allocation, it will keep the call to mallocgc, and mallocgc itself has to determine whether a specialized function is available, which one it is, and then needs to call it. So the performance of the specialized function has to be high enough that even with the overhead of a dynamic call it’s still faster.
This overhead issue isn’t the only problem. If it were, then we could create larger specialized functions, and have them reserved for the compiler to insert them when the size is known at compile-time. And if we didn’t call them dynamically we wouldn’t have to pay the dynamic overhead. But each specialized function that’s added increases the sizes of the executables produced by the compiler, and, more importantly, takes up precious instruction cache space. The single mallocgc function is often in the instruction cache because of how frequently allocations happen. If we have too many specialized functions and they’re not available in the cache, the overhead to retrieve the specialized code into the cache can cancel out any benefits. And the more specialized allocation code that’s in the icache, the more it crowds out the user code, making it slower to fetch and run user code. Doing a bunch of benchmarks stopping at different size classes, we determined that stopping at 80 bytes was the sweet spot.
Of course, adding more specialized functions means more code to maintain. If each function were hand-written, the code in the specialized functions could easily drift apart and go out of sync. To help with this, we broke out the common parts of the specialized functions and wrote an inliner using the standard library go/ast package to parse and format and the golang.org/x/tools/go/ast/astutil package to manipulate the ASTs. The common parts of the functions are all written in standard Go code that is built and typechecked with the rest of the runtime to allow our tools to catch issues, but they are mostly just stubs for the inliner.
So we were able to measure improvements in the size-specialized allocation functions, but why are they actually faster? The most apparent optimization is in clearing memory. The memory returned by mallocgc does not always need to be zeroed, but it often does, and doing so can often take up most of the time of the allocation. The memory clearing function memclrNoHeapPointers is written in highly-optimized assembly, but we could do better for the smaller clears. In a specialized function, if the size of the clear is constant, the compiler can replace calls to memclrNoHeapPointers with code to directly produce the instructions to clear the memory. The allocation can then skip a function call and some branches. This makes a difference for the really small allocations, but as they get bigger, the function call overhead becomes negligible.
While faster memory clearing provides the biggest improvement, there are some other tricks that are also possible in the specialized functions: Since they are specialized per span-class, the function doesn’t need to calculate the span class when retrieving the span. And because the size of the allocation is a constant, the compiler is able to do some optimizations to speed up the bookkeeping necessary for the allocation. One such case is with marking where the pointers are in the allocated memory. The specialized functions could also manually inline several of its helper functions. The go compiler can inline code, but it avoids inlining functions that it considers too large. We can override that in the generated code by inserting the function bodies into the callers. With the generator we can produce copies of each of the bodies without needing to worry about each of the copies drifting. And we could move code that handled less common cases, such as the runtime debugging flags, into the slow path functions to make the specialized functions smaller.
While we hope this explanation of size-specialzed allocation is interesting, you as a Go programmer don’t need to think about any of this when writing your code. Memory allocations will just be a little faster, with the biggest benefits going to some of the most common allocations sizes, especially the 16 and 24 byte allocations. These allocations are some of the most common because they consist of two or three 64-bit values, so they include allocations for things such as interface values and strings which have two values, or slices which have three. We spent a lot of time tuning the behavior of size specialized malloc and making sure the impact of the instruction cache effects will be minimal: we were originally planning to release size-specialized allocation in Go 1.26 but decided to wait an extra release to do extra tuning and cut down the additional code size as much as we could.
All you need to do to get the improved performance from size specialized allocations in your programs is to build them with Go 1.27. If you’re interested in more concrete actions you can take to improve memory allocation and garbage collection performance, please read the Go Garbage Collector Optimization Guide.
Although we are confident that size-specialized allocation should not cause regressions in your code, if necessary, you can build your programs using GOEXPERIMENT=nosizespecializedmalloc to disable it. If you do need to do this to solve an issue you’re experiencing with size-specialized allocation, please file an issue at go.dev/issue/new so we can investigate it.
Original source - Sep 2, 2026
- Date parsed from source:Sep 2, 2026
- First seen by Releasebot:Sep 3, 2026
[security] Vulnerabilities in golang.org/x/crypto
Go tags golang.org/x/crypto v0.56.0 with security fixes for ssh, preventing denial-of-service deadlocks on established and undecided channels by handling or dropping unexpected messages instead of buffering and blocking the connection.
Howdy gophers,
We have tagged version v0.56.0 of golang.org/x/crypto in order to address the following security issues:
ssh: prevent DoS on deadlocked established channel
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 protocol error and tear the connection down instead of buffering and blocking.
Thanks to Will Mortensen for reporting this issue.
This is CVE-2026-56855 and Go issue https://go.dev/issue/81317.ssh: prevent DoS on deadlocked undecided channel
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 usable. Until such a time, handlePacket drops every packet other than the open confirmation/failure, without blocking and without tearing down the connection.
Thanks to Will Mortensen for reporting this issue.
This is CVE-2026-78662 and Go issue https://go.dev/issue/81316.Cheers,
Original source
Go Security Team
Curated by the Releasebot team
Releasebot is an aggregator of official product update announcements from hundreds of software vendors and thousands of sources.
Our editorial process involves the manual review and audit of release notes procured with the help of automated systems.