{"id":"CVE-2026-48031","published":"2026-08-03T19:05:50Z","modified":"2026-08-03T19:49:15Z","title":"Go Restful API Boilerplate: Hardcoded JWT Secret \"random\" Allows Token Forgery","vendor":"dhax","product":"go-base","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.1,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00626,"percentile":0.50934,"provenance":"source"},"cwes":[{"id":"CWE-798","name":"Use of Hard-coded Credentials"}],"references":[{"url":"https://github.com/dhax/go-base/security/advisories/GHSA-mqq6-462x-jxmm","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/dhax/go-base/pull/31","tags":["x_refsource_MISC"]},{"url":"https://github.com/dhax/go-base/commit/cc82b9740fa6b08e0fad409cd4b418e240dd0e00","tags":["x_refsource_MISC"]}],"priority":{"score":16.6,"factors":[{"name":"EPSS percentile","points":10.19},{"name":"CVSS severity","points":6.37}]},"vendorSlug":"dhax","affectedVersions":[{"vendor":"dhax","product":"go-base","versions":["2026-05-18"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"total","timestamp":"2026-08-03T19:48:46.447146Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"github.com/dhax/go-base","vulnerableRanges":["<0.0.0-20260517152733-cc82b9740fa6"],"patched":["0.0.0-20260517152733-cc82b9740fa6"],"from":["GHSA-mqq6-462x-jxmm","GO-2026-5515"],"provenance":"source"}],"summary":{"text":"The JWT signing secret in dhax's go-base Go RESTful API boilerplate (JWT authentication with PostgreSQL) is hardcoded to the string \"random\" in both the dev.env template and a fallback in cmd/serve.go, so it is used even when no .env file exists. An attacker who can read the public repository can forge JWT tokens for arbitrary users, including admin roles, and bypass authentication on protected endpoints over the network with no privileges or user interaction required.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:55:11Z"},"euvd":{"id":"EUVD-2026-52408","exploited":false,"provenance":"source"}}