CVE-2026-21697: Go Shared Httpclient Race

Directly mutating properties (e.g., `Timeout`, `Transport`, `CheckRedirect`) of a shared `http.Client` structure (such as via a method receiver field) without synchronization can cause a race condition. This cross-request state contamination might result in leaking credentials or routing behavior to concurrent requests. Instead of mutating a shared `http.Cli

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Go
greprules fetch cve-2026-21697-go-shared-httpclient-race --engine opengrep

Description

Directly mutating properties (e.g., `Timeout`, `Transport`, `CheckRedirect`) of a shared `http.Client` structure (such as via a method receiver field) without synchronization can cause a race condition. This cross-request state contamination might result in leaking credentials or routing behavior to concurrent requests. Instead of mutating a shared `http.Cli