CVE-2026-47725: Go Chi Mutating Route Missing Csrf

State-changing HTTP endpoints (POST, PUT, DELETE, PATCH) should be protected against Cross-Site Request Forgery (CSRF) if they rely on cookie-based authentication. This rule detects chi routes missing a `.Use(...)` middleware application within the same function scope, which often indicates missing CSRF protection.

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0Go
greprules fetch cve-2026-47725-go-chi-mutating-route-missing-csrf --engine opengrep

Description

State-changing HTTP endpoints (POST, PUT, DELETE, PATCH) should be protected against Cross-Site Request Forgery (CSRF) if they rely on cookie-based authentication. This rule detects chi routes missing a `.Use(...)` middleware application within the same function scope, which often indicates missing CSRF protection.