---
title: "CVE-2026-48031: Go Restful API Boilerplate: Hardcoded JWT Secret \"random\" Allows Token Forgery"
url: https://erroneo.us/security/cve/CVE-2026-48031/
description: "CVE-2026-48031 (github.com/dhax/go-base (Go)): go-base is a Go RESTful API Boilerplate template with JWT Authentication, backed by PostgreSQL. In versions…"
type: vulnerability-record
section: "Security Digest"
date_published: 2026-08-03
date_modified: 2026-08-03
publisher: erroneo.us
author: erroneo.us Security Desk
cve: "CVE-2026-48031"
kev: false
cvss: 9.1
epss: 0.00626
license: All rights reserved. Quote with attribution and a link.
---

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

**Signal:** Critical and remotely reachable. No known exploitation yet, but it is network-reachable without credentials. (Computed from CISA KEV, EPSS and CVSS; not an editorial verdict.)

## Should you act?

- Not in CISA KEV , but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
- EPSS 0.6% , percentile 49: FIRST’s model estimates a 0.6% chance of exploitation activity in the next 30 days, higher than 49% of all scored CVEs (low). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes github.com/dhax/go-base (Go) < 0.0.0-20260517152733-cc82b9740fa6, fixed in 0.0.0-20260517152733-cc82b9740fa6 . Check your lockfile, including transitive dependencies.

## What it is

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.

## Affected packages

- Go `github.com/dhax/go-base` < 0.0.0-20260517152733-cc82b9740fa6 → fixed: 0.0.0-20260517152733-cc82b9740fa6

## Affected products (CVE record)

- dhax go-base: 2026-05-18

## Severity

- GitHub_M CVSS 3.1: 9.1 `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 `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`

## Exploitation

- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation poc , automatable yes , technical impact total .
- FIRST EPSS (model of 2026-10-21): 0.63% probability of exploitation activity in the next 30 days; percentile 49.

## Sources

- [GitHub Advisory GHSA-mqq6-462x-jxmm](https://github.com/advisories/GHSA-mqq6-462x-jxmm)
- [CVE.org record CVE-2026-48031](https://www.cve.org/CVERecord?id=CVE-2026-48031)
- [NVD entry CVE-2026-48031](https://nvd.nist.gov/vuln/detail/CVE-2026-48031)
- [github.com](https://github.com/dhax/go-base/security/advisories/GHSA-mqq6-462x-jxmm)
- [github.com](https://github.com/dhax/go-base/pull/31)
- [github.com](https://github.com/dhax/go-base/commit/cc82b9740fa6b08e0fad409cd4b418e240dd0e00)

---
Source page: https://erroneo.us/security/cve/CVE-2026-48031/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
