RepoJournal
Go

@golang

Go and the standard library - backend infrastructure at scale

Keep up with Go in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.

One email a day. Unsubscribe in one click.

Pick a date

Topics: Go Infrastructure Full archive →

The Wire · Showcase

NET/TEXTPROTO INJECTION FLAW OPENS ERROR MESSAGES TO ATTACKER CONTROL

By RepoJournal · Filed · About Go

An attacker can inject arbitrary content into errors returned by net/textproto when external input reaches the package unescaped, potentially exploiting HTTP clients that parse untrusted server headers.

The net/textproto package has been including user-controlled input directly in error messages without escaping [1]. This matters because HTTP clients naturally use ReadMIMEHeader to parse headers from servers, meaning an attacker controlling a server response can craft malicious header content that propagates through error strings. This is a real injection vector for applications that log or expose errors to downstream systems.

On the compiler side, Go's optimization pipeline got smarter about amd64 code generation [2]. The fix removes unnecessary roundtrips between flags, booleans, and flags again, cleaning up bloated generated assembly and improving both code size and efficiency. This is the kind of surgical optimization that accumulates into measurable wins across large binaries.

Escape analysis also tightened up: singly-assigned function variables can now be recognized as static [3], which means recursive closures won't pessimistically escape heap allocations anymore. QUIC's MAX_DATA frame handling got corrected [4] where sentLimit was being incorrectly accumulated instead of properly updated to reflect the last value sent to peers.

One email a day. Unsubscribe in one click.

Action items

References

  1. [1] net/textproto: escape arbitrary input when including them in errors golang/go
  2. [2] cmd/compile: remove flags → bool → flags roundtrips on amd64 golang/go
  3. [3] cmd/compile: treat singly-assigned func vars as static in escape analysis golang/go
  4. [4] quic: fix appendMaxDataFrame erroneously accumulating sentLimit golang/net

Quick answers

What shipped in Go on May 16, 2026?
An attacker can inject arbitrary content into errors returned by net/textproto when external input reaches the package unescaped, potentially exploiting HTTP clients that parse untrusted server headers. In total, 11 commits landed.
What were the notable Go updates?
net/textproto: escape arbitrary input when including them in errors, cmd/compile: remove flags → bool → flags roundtrips on amd64, and cmd/compile: treat singly-assigned func vars as static in escape analysis.

More from @golang

Daily updates, in your inbox

Follow Go

Keep up with Go in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.

or

One email a day. Unsubscribe in one click. Read a past issue →

Elsewhere on the wire

Want every project, not just this one?