CVE-2026-58416: Insecure Custom Csrf Cookie Protector

Detected custom token-based CSRF protector implementation. Custom CSRF implementations relying on cookie/token comparisons are prone to token leakage and logic bypasses. Use standard origin-checking cross-origin protection middleware (e.g., verifying Sec-Fetch-Site and Origin headers) instead.

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0Go
greprules fetch cve-2026-58416-insecure-custom-csrf-cookie-protector --engine opengrep

Description

Detected custom token-based CSRF protector implementation. Custom CSRF implementations relying on cookie/token comparisons are prone to token leakage and logic bypasses. Use standard origin-checking cross-origin protection middleware (e.g., verifying Sec-Fetch-Site and Origin headers) instead.