CVE-2026-41145: Unsanitized Http Trailer In Custom Chunk Reader

A custom HTTP stream reader is created from an HTTP request body but fails to clear or sanitize `req.Trailer`. Go's `net/http` server automatically populates this field with trailing headers upon reading a chunked request. If the application later trusts these unverified trailers (e.g., for metadata or chunk signatures), attackers can smuggle unsigned traili

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Go
greprules fetch cve-2026-41145-unsanitized-http-trailer-in-custom-chunk-reader --engine opengrep

Description

A custom HTTP stream reader is created from an HTTP request body but fails to clear or sanitize `req.Trailer`. Go's `net/http` server automatically populates this field with trailing headers upon reading a chunked request. If the application later trusts these unverified trailers (e.g., for metadata or chunk signatures), attackers can smuggle unsigned traili