{"cve":"CVE-2026-48031","nvd":{"published":"2026-08-03T20:17:24.200","modified":"2026-10-23T21:10:00.157","status":"Deferred","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":9.1},"cwes":["CWE-798"],"references":["https://github.com/dhax/go-base/commit/cc82b9740fa6b08e0fad409cd4b418e240dd0e00","https://github.com/dhax/go-base/pull/31","https://github.com/dhax/go-base/security/advisories/GHSA-mqq6-462x-jxmm","https://github.com/dhax/go-base/security/advisories/GHSA-mqq6-462x-jxmm"],"products":[],"source":"nvd","synced_at":"2026-10-24T16:53:34.184483516+00:00"},"epss":{"cve":"CVE-2026-48031","score":0.00626,"percentile":0.49698,"date":"2026-10-25"},"kev":null,"osv":[{"id":"GHSA-mqq6-462x-jxmm","url":"https://osv.dev/vulnerability/GHSA-mqq6-462x-jxmm","summary":"Go Restful API Boilerplate: Hardcoded JWT Secret \"random\" Allows Token Forgery","modified":"2026-06-25T23:11:06.817659681Z","packages":[{"ecosystem":"Go","name":"github.com/dhax/go-base","purl":"pkg:golang/github.com/dhax/go-base","ranges":["<0.0.0-20260517152733-cc82b9740fa6"],"fixed":["0.0.0-20260517152733-cc82b9740fa6"]}]},{"id":"GO-2026-5515","url":"https://osv.dev/vulnerability/GO-2026-5515","summary":"Go Restful API Boilerplate: Hardcoded JWT Secret \"random\" Allows Token Forgery in github.com/dhax/go-base","modified":"2026-06-25T23:01:19.235062263Z","packages":[{"ecosystem":"Go","name":"github.com/dhax/go-base","purl":"pkg:golang/github.com/dhax/go-base","ranges":["<0.0.0-20260517152733-cc82b9740fa6"],"fixed":["0.0.0-20260517152733-cc82b9740fa6"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}