{"answers":{"affected":"3 open source packages ship an affected version, including github.com/dhax/go-base.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-48031 exists.","fix":"Upgrade github.com/dhax/go-base to 0.0.0-20260517152733-cc82b9740fa6 or later.","what":"CVE-2026-48031 is a critical vulnerability in dhax go-base, published on 3 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-48031 and fix it if it is affected.\n\nWhat it is: CVE-2026-48031 is a critical vulnerability in dhax go-base, published on 3 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-48031 exists.\n\nAffected packages and fixed versions:\n- github.com/dhax/go-base (Go): affected all versions; fixed in 0.0.0-20260517152733-cc82b9740fa6\n- github.com/dhax/go-base (Go): affected all versions; fixed in 0.0.0-20260517152733-cc82b9740fa6\n- github.com/dhax/go-base (Go): affected all versions; fixed in 0.0.0-20260517152733-cc82b9740fa6\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-48031/ (Markdown: https://insights.sbomify.com/CVE-2026-48031/index.md)","id":"CVE-2026-48031","markdown":"https://insights.sbomify.com/CVE-2026-48031/index.md","name":"CVE-2026-48031","record":{"aliases":["GHSA-mqq6-462x-jxmm","GO-2026-5515"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["account_takeover","security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Go REST API boilerplate","requires_auth":"none","summary":"Hardcoded JWT secret allows attackers to forge tokens and bypass authentication, gaining admin access to protected endpoints.","user_interaction":"not_required","vuln_class":"hardcoded_credentials"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":9.1,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-798","name":"Use of Hard-coded Credentials"}],"description":"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.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Go Restful API Boilerplate: Hardcoded JWT Secret \"random\" Allows Token Forgery","id":"CVE-2026-48031","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"hardcoded_credentials","year":"2026"},"n_packages":3,"n_references":3,"next":{"headline":"Hulumi: IAM-role policy checks bypassed when the role trusts multiple OIDC providers","id":"CVE-2026-48032"},"packages":[{"ecosystem":"Go","fixed":["0.0.0-20260517152733-cc82b9740fa6"],"introduced":["0"],"last_affected":[],"package":"github.com/dhax/go-base","purl":null,"source":"GHSA-mqq6-462x-jxmm"},{"ecosystem":"Go","fixed":["0.0.0-20260517152733-cc82b9740fa6"],"introduced":["0"],"last_affected":[],"package":"github.com/dhax/go-base","purl":"pkg:golang/github.com/dhax/go-base","source":"GHSA-mqq6-462x-jxmm"},{"ecosystem":"Go","fixed":["0.0.0-20260517152733-cc82b9740fa6"],"introduced":["0"],"last_affected":[],"package":"github.com/dhax/go-base","purl":"pkg:golang/github.com/dhax/go-base","source":"GO-2026-5515"}],"prev":{"headline":"Pheditor: OS Command Injection in terminal handler via unsanitized 'dir' parameter (CWE-78)","id":"CVE-2026-48030"},"products":["go-base"],"published":"2026-08-03","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-08-03","vendors":["dhax"]},"summary":"Hardcoded JWT secret allows attackers to forge tokens and bypass authentication, gaining admin access to protected endpoints.","url":"https://insights.sbomify.com/CVE-2026-48031/"}