RepoJournal
Go

@golang

Go and the standard library — backend infrastructure at scale

Pick a date

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.

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

FAQ

What changed 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.
What should Go teams do about it?
Review any code using net/textproto that exposes error output; patch incoming • Monitor next Go release for the escape analysis and compiler improvements • If running QUIC-backed services, watch for the sentLimit fix in net module updates
Which Go repositories shipped on May 16, 2026?
golang/go, golang/net

Related across the cluster

For your repos

The showcase is a teaser.
Your wire is the product.

Same engine. Different stack. Below: what changes when the wire is yours.

Showcase wire

  • 14 famous open source orgs
  • One wire per day
  • Public, generic
  • Read on the web, when you remember

Your wire

  • Up to 1,500 of your repos - orgs, deps, vendors
  • Morning and evening briefs
  • Action items routed to your team
  • Slack delivery, email, breaking-news CVE alerts

Want a hands-on demo first? Ask a current user for an invite link.