cve.bz

CVE-2026-48031 dhax go-base: Use of Hard-coded Credentials

9.1 criticalEPSS 0.6%Fix available

Critical (9.1) in dhax go-base. EPSS 0.6% estimated probability of exploitation activity in the next 30 days. Fixed in github.com/dhax/go-base 0.0.0-20260517152733-cc82b9740fa6.

On this page
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.

Severity

CVSS 3.1

9.1 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
EPSS
0.6% (unchanged from 0.6% a week ago; 0.6% 30 days ago) estimated probability of exploitation activity in the next 30 days; 51st percentile. Scored 2026-11-23. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: yes · Technical impact: total, assessed 2026-08-03. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-798 Use of Hard-coded Credentials
OWASP Top 10
A07:2025 Authentication Failures
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-48031 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-48031?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-48031?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-48031 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
dhax go-base2026-05-18

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-mqq6-462x-jxmmGogithub.com/dhax/go-base<0.0.0-20260517152733-cc82b9740fa60.0.0-20260517152733-cc82b9740fa6
GO-2026-5515Gogithub.com/dhax/go-base<0.0.0-20260517152733-cc82b9740fa60.0.0-20260517152733-cc82b9740fa6

Linux distributions

DistributionReleasePackageFixed inAdvisory
openSUSELeap 16.0govulncheck-vulndb0.0.20260723T184607-160000.1.1openSUSE-SU-2026:21483-1

From the distributions' data via OSV.dev: SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: openSUSE.

Attack patterns (CAPEC)

  • CAPEC-70 Try Common or Default Usernames and Passwords Likelihood: Medium · Severity: High
  • CAPEC-191 Read Sensitive Constants Within an Executable Severity: Low

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON