critical

Go Restful API Boilerplate (dhax/go-base): Hardcoded JWT Secret "random" Allows Token Forgery and Auth Bypass

critical-cve-against-dependency · active

The dhax/go-base Go REST API boilerplate ships with a hardcoded JWT signing secret ("random") in both its template env file and a code-level default. Because the secret is public, an attacker can forge JWT tokens for any user — including admin roles — completely bypassing authentication on all protected endpoints. A fix was merged in PR #31 (May 17, 2026).

Affected packages

Indicators of compromise

Sources