CVE-2026-48031

Source
https://cve.org/CVERecord?id=CVE-2026-48031
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-48031.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-48031
Aliases
Downstream
Related
Published
2026-08-03T19:05:50.679Z
Modified
2026-08-12T03:51:45.006673217Z
Severity
  • 9.1 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N CVSS Calculator
Summary
Go Restful API Boilerplate: Hardcoded JWT Secret "random" Allows Token Forgery
Details

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.

Database specific
{
    "cwe_ids": [
        "CWE-798"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/48xxx/CVE-2026-48031.json",
    "cna_assigner": "GitHub_M",
    "unresolved_ranges": [
        {
            "extracted_events": [
                {
                    "introduced": "2026-05-18"
                },
                {
                    "last_affected": "2026-05-18"
                }
            ],
            "source": "AFFECTED_FIELD"
        }
    ]
}
References

Affected packages

Git / github.com/dhax/go-base

Affected ranges

Type
GIT
Repo
https://github.com/dhax/go-base
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Database specific
Show details
{
    "source": "REFERENCES"
}

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-48031.json"