CVE-2026-48154

GoRest: InMemorySecret2FA race condition allows process crash via concurrent map access

Published Aug 4, 2026 CVSS 3.1 · 5.9 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

GoRest is a Golang starter kit that provides RESTful API scaffolding. In versions before 1.12.2, the InMemorySecret2FA component uses an unsynchronized package‑level map to store two‑factor authentication secrets. Concurrent read and write access to this map by HTTP handlers triggers a fatal error in the Go runtime, resulting in a crash of the entire process. The impact is a repeatable denial of service that affects only availability; there is no direct loss of confidentiality or integrity.

Affected Systems

The affected product is pilinux’s GoRest, a Golang web framework toolkit. The vulnerability exists in all releases prior to 1.12.2. Deployments that enable the two‑factor authentication flow through the login or twoFA routes are directly impacted.

Risk and Exploitability

The CVSS score of 5.9 indicates medium severity, and the EPSS score is not available, suggesting limited data on exploitation likelihood. The vulnerability is not listed in the CISA KEV catalog. Attackers can exploit the race condition by repeatedly invoking the affected endpoints with concurrent requests, a path that is trivial to execute from any machine with network access to the API, without requiring advanced privileges or payload delivery.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade GoRest to version 1.12.2 or newer, which synchronizes the map access and eliminates the crash condition.
  • If an upgrade cannot be performed immediately, temporarily disable or restrict the 2FA endpoints that use InMemorySecret2FA to reduce concurrent access while monitoring for crashes.
  • Configure the application host or container orchestration to automatically restart the process on crash, ensuring service continuity until a patch is applied.

Generated by OpenCVE AI on August 4, 2026 at 21:29 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-cpwg-x64r-rgwg gorest InMemorySecret2FA race condition allows process crash via concurrent map access (CWE-362)
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Pilinux
Pilinux gorest
Vendors & Products Pilinux
Pilinux gorest
Type Values Removed Values Added
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.
Title GoRest: InMemorySecret2FA race condition allows process crash via concurrent map access
Weaknesses CWE-362
References
Metrics cvssV3_1

{'score': 5.9, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H'}

Weaknesses
  • CWE-362

    Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 5, 2026, 7:48 PM
Reserved
May 20, 2026, 11:12 PM
Status
Deferred
Published
Aug 4, 2026, 8:16 PM
Modified
Oct 23, 2026, 9:10 PM