CVE-2026-48031: Go Chi Jwtauth Unvalidated Config Secret

A JWT secret is loaded from configuration or environment and used without explicit length or weakness validation. If the variable is unset or overridden with weak values (e.g., an empty string), an attacker can forge valid JWTs to bypass authentication. Verify the length and strength of the secret before initializing the JWT instance.

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Go
greprules fetch cve-2026-48031-go-chi-jwtauth-unvalidated-config-secret --engine opengrep

Description

A JWT secret is loaded from configuration or environment and used without explicit length or weakness validation. If the variable is unset or overridden with weak values (e.g., an empty string), an attacker can forge valid JWTs to bypass authentication. Verify the length and strength of the secret before initializing the JWT instance.