Security mailing lists by PureSourceCode

CVE-2026-48031

CRITICAL 9.1CVSS 3.1

Go Restful API Boilerplate: Hardcoded JWT Secret "random" Allows Token Forgery

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.

Published
3 Aug 2026
Last modified
23 Oct 2026
Assigned by
security-advisories@github.com
NVD status
Deferred
Weakness
CWE-798
Also known as
GHSA-mqq6-462x-jxmmGO-2026-5515
Sources
NVDJSONOSV GHSA-mqq6-462x-jxmmJSONOSV GO-2026-5515JSON

Scores

SourceScored byVersionScoreVector / decision
NVD security-advisories@github.com (Secondary) CVSS 3.1 CRITICAL 9.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
OSV GitHub CVSS 3.1 CRITICAL 9.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
OSV Go github.com/dhax/go-base < 0.0.0-20260517152733-cc82b9740fa6 0.0.0-20260517152733-cc82b9740fa6

References

History

  • 25 Nov 2026 21:04 UTC · NVD: first stored (published 3 Aug 2026)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 25 Jun 2026)
  • 25 Nov 2026 20:13 UTC · OSV: first stored (published 10 Jun 2026)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.