CVE-2026-48031 json
Go Restful API Boilerplate: Hardcoded JWT Secret "random" Allows Token Forgery
published 2026-06-10 4 mo ago modified 2026-10-23 16 d ago also GHSA-mqq6-462x-jxmm , GO-2026-5515 , EUVD-2026-52408
- cvss
- 9.1
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.6%
- EPSS 0.6% chance of exploitation in 30 days, percentile 50%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- go github.com/dhax/go-base 0.0.0-20260517152733-cc82b9740fa6
- govulncheck-vulndb openSUSE Leap 16.0 0.0.20260723T184607-160000.1.1
opensuse advisories openSUSE-SU-2026:21483-1
- github.com/dhax/go-base@cc82b97 commit
- github.com/dhax/go-base#31 pull request
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- total
- Assessed
- 3 mo ago
Exploit prediction
0.63% chance of exploitation in the next 30 days, higher than 50% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/dhax/go-base/security/advisories/GHSA-mqq6-462x-jxmm referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 9.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
| GitHub | 3.1 | 9.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| go | github.com/dhax/go-base | <0.0.0-20260517152733-cc82b9740fa6 |
0.0.0-20260517152733-cc82b9740fa6 |
Affected products
- dhax go-base
Classification
- Weakness
-
- CWE-798 Use of Hard-coded Credentials
References
Sources
- CVE List CVE-2026-48031
- GitHub Advisory GHSA-mqq6-462x-jxmm
- NVD CVE-2026-48031
- OSV GO-2026-5515
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.