جزئیات آسیبپذیری
CVE-2026-48031
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.
امتیازهای CVSS
| امتیاز | نسخه | منبع | بردار |
|---|---|---|---|
| 9.1بحرانی | 3.1 | CVEProject cvelistV5 (CNA) (GitHub_M) | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
محصولات آسیبپذیر
| فروشنده | محصول | نسخهها | منبع |
|---|---|---|---|
| dhax | go-base | 2026-05-18 | CVEProject cvelistV5 (CNA) |
منابع و راهنماها
۳- https://github.com/dhax/go-base/pull/31 x_refsource_MISC
- https://github.com/dhax/go-base/commit/cc82b9740fa6b08e0fad409cd4b418e240dd0e00 x_refsource_MISC
- https://github.com/dhax/go-base/security/advisories/GHSA-mqq6-462x-jxmm x_refsource_CONFIRM
اطلاعات
- تاریخ انتشار
- ۱۴۰۵/۰۵/۱۲
- آخرین بهروزرسانی
- ۱۴۰۵/۰۵/۱۲
- وضعیت
- منتشرشده
- صادرکننده (CNA)
- GitHub_M
پیشبینی بهرهبرداری (EPSS)
ارزیابی SSVC (CISA)
- قابل خودکارسازی
- بله
- وضعیت بهرهبرداری
- اثبات مفهوم
- اثر فنی
- کامل
ضعفها (CWE)
- CWE-798Use of Hard-coded Credentials