CVE-2026-48031CWE-798hardcoded-credentials

CVE-2026-48031

Critical · published August 4, 2026

CVSS v3.1
9.1
EPSS
1%
Percentile
49.3
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS v3.1
9.1 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
CVSS v4.0
Not supplied
EPSS
0.00626 · 49.3th percentile
Weakness
CWE-798 · Use of Hard-coded Credentials
Published
2026-08-04T00:17Z
References (4)
EPSS history
Timeline
  • 03 AUG 19:05Z
    Go Restful API Boilerplate: Hardcoded JWT Secret "random" Allows Token Forgery
    cvelistv5