CVE-2026-48031

Critical

Description

go-base is a Go RESTful API Boilerplate template with JWT Authentication, backed by PostgreSQL. In versions prior to 2026-05-18, the JWT signing secret is hardcoded to the known string "random", letting any attacker who reads the public repository forge tokens for arbitrary users, including admin roles, and completely bypass authentication on all protected endpoints. This value is set in two places: the dev.env template (line 10) and a programmatic fallback in cmd/serve.go (line 35), so the application uses it even when no .env file is present. The original mitigation in auth/jwt/tokenauth.go (lines 22 to 25) only caught the exact string "random", letting other weak secrets through, and replaced it with an in-memory key that was not persisted, invalidating all tokens on every restart and effectively causing a denial-of-service. This issue has been fixed in version 2026-05-18.

SeverityCritical
CVSS9.1
Exploit probability50. percentile0.6%
ProductGithub.com/dhax/go-base
PublishedAug 3, 2026
First seenAug 3, 2026

How to fix

Update
  • github.com/dhax/go-base0.0.0-20260517152733-cc82b9740fa6 or later

Affected products

ProductAffected versionsFixed in
github.com/dhax/go-baseGov < 0.0.0-20260517152733-cc82b9740fa60.0.0-20260517152733-cc82b9740fa6

Check your version

Choose the product and enter the version you run to see whether it falls in the affected range.

In the Intelligence 360 plan

Attack Surface Management

See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.