$ the-wire · showcase
GO PATCHES TEMPLATE INJECTION FLAW, HTTP/2 GOROUTINE LEAK
By RepoJournal · Filed · About Go · Composed from the cited sources · methodology
Go shipped a security fix for html/template that blocks JavaScript regexp injection attacks, while simultaneously addressing a goroutine accumulation bug in HTTP/2 transports that could exhaust memory on long-lived connections.
The template injection fix [1] prevents attackers from closing unescaped forward slashes early, a pathological input that previously allowed arbitrary content injection. This tracks the invariant first hinted at in related work [3]. Separately, Brad Fitzpatrick landed a critical fix [2] that lets HTTP/2 Transport request-write goroutines exit immediately after sending the request, rather than parking until stream end. For clients with many concurrent long-lived response streams like event subscriptions or long polls, that fix eliminates a parked goroutine and its stack per stream. The golang/text team also patched a buffer overflow in the PRECIS Nickname profile [4], which was writing interior spaces without checking destination capacity first, now properly returning ErrShortDst on overflow. Across both repos, 4 commits landed overnight addressing memory efficiency and injection hardening.
Action items
- → Update Go immediately for CVE-2026-56858 template injection fix golang/go [immediate]
- → Redeploy services with long-lived HTTP/2 streams to capture goroutine leak fix golang/go [plan]
- → Test text/precis Nickname profile handling with short buffers if in use golang/text [monitor]
References
- [1] html/template: fix JavaScript regexp tracking ↗ golang/go
- [2] net/http/internal/http2: let Transport's request-write goroutine exit early ↗ golang/go
- [3] encoding/json/v2: modify documentation ↗ golang/go
- [4] secure/precis: fix short destination buffer handling in Nickname profile ↗ golang/text