CVE-2026-20706: Generic Shared Middleware State Mutation

Modifying a receiver's field inside an HTTP handler or middleware leads to a data race if the middleware is instantiated once and shared across multiple concurrent requests. Store per-request state in the request context or return a new instance per request.

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0Go
greprules fetch cve-2026-20706-generic-shared-middleware-state-mutation --engine opengrep

Description

Modifying a receiver's field inside an HTTP handler or middleware leads to a data race if the middleware is instantiated once and shared across multiple concurrent requests. Store per-request state in the request context or return a new instance per request.