# CVE-2026-48031: Go Restful API Boilerplate: Hardcoded JWT Secret "random" Allows Token Forgery

- Severity: Critical 9.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.44%, higher than 39% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-06-10T13:39:18.000Z
- Modified: 2026-10-23T21:10:00.157Z
- Also known as: GHSA-mqq6-462x-jxmm, GO-2026-5515
- Weaknesses: CWE-798
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- dhax go-base: 2026-05-18
- github.com/dhax/go-base (Go): before 0.0.0-20260517152733-cc82b9740fa6

## Every score

- GitHub_M: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`
- GitHub: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`

## References

- <https://github.com/dhax/go-base/security/advisories/GHSA-mqq6-462x-jxmm> (exploit, advisory, web)
- <https://github.com/dhax/go-base/pull/31>
- <https://github.com/dhax/go-base/commit/cc82b9740fa6b08e0fad409cd4b418e240dd0e00> (fix, web)
- <https://github.com/dhax/go-base> (package)

## Sources

- CVE List: [CVE-2026-48031](https://www.cve.org/CVERecord?id=CVE-2026-48031), CVE Terms of Use, modified 2026-08-03
- GitHub Advisory Database: [GHSA-mqq6-462x-jxmm](https://github.com/advisories/GHSA-mqq6-462x-jxmm), CC-BY-4.0, modified 2026-06-25
- Go Vulnerability Database: [GO-2026-5515](https://pkg.go.dev/vuln/GO-2026-5515), CC-BY-4.0, modified 2026-06-25
- NVD: [CVE-2026-48031](https://nvd.nist.gov/vuln/detail/CVE-2026-48031), Public domain, modified 2026-10-23

---

Page: https://cve.day/CVE-2026-48031 · Whole record: https://cve.day/CVE-2026-48031.json · Rebuilt by cve.day 2026-11-25T22:59:30.893Z
