CVE-2026-48154 in GoRestinfo

Summary

by MITRE • 08/04/2026

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.

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 08/04/2026

The GoRest framework represents a popular golang starter kit designed for rapid development of restful apis using the gin framework. This toolset provides developers with pre-built components and structures to accelerate api prototyping and development cycles. However, a critical race condition vulnerability was discovered in versions prior to 1122 that fundamentally undermines the framework's stability and availability. The vulnerability manifests in the nMemorySecret2FA component which serves as a temporary storage mechanism for two factor authentication secrets during user sessions. This component utilizes a package-level map structure to maintain 2fa secret data, creating a singleton-like behavior across all concurrent handler invocations within the application.

The technical flaw stems from unsynchronized access to this shared map structure, where multiple http handlers in handlerlogingo and handlertwoFAgo simultaneously attempt to read from and write to the same underlying data structure without proper synchronization mechanisms. The gin framework's runtime environment treats such concurrent map operations as unrecoverable fatal errors, specifically triggering a panic condition that terminates the entire process execution. This race condition occurs because go language specification does not permit unsynchronized concurrent access to maps, which would otherwise lead to memory corruption and undefined behavior. When multiple attackers or legitimate users trigger concurrent 2fa operations simultaneously, the application experiences deterministic crashes with each invocation.

The operational impact of this vulnerability is severe and highly repeatable, as it directly affects the availability of the entire api service without requiring any privileged access or complex exploitation techniques. An attacker can simply construct multiple concurrent requests that trigger both login and two factor authentication handlers simultaneously, causing the process to crash on demand. This creates a denial of service condition that can be easily reproduced and maintained, making it particularly dangerous in production environments where service availability is paramount. The vulnerability affects all versions prior to 1122, indicating that the issue persisted across multiple releases before receiving proper remediation.

This specific weakness aligns with common cybersecurity vulnerabilities categorized under cwe-367 which addresses time-of-check to time-of-use issues and race conditions in concurrent programming environments. The flaw also demonstrates characteristics consistent with attack techniques outlined in the attack mitigation framework where an adversary can leverage application design flaws to create availability impacts without compromising confidentiality or integrity of data. The fix implemented in version 1122 involved proper synchronization mechanisms such as mutex locks or other thread-safe approaches to protect concurrent access to the shared map structure. This remediation ensures that all operations accessing the nMemorySecret2FA data structure are properly serialized, preventing the fatal runtime errors that previously terminated application processes.

The vulnerability highlights fundamental security considerations in api development where shared state management becomes critical in multi-threaded environments. The issue demonstrates how seemingly innocuous design patterns can create catastrophic availability failures when concurrent access is not properly controlled. Organizations deploying goRest frameworks should immediately upgrade to version 1122 or later to ensure protection against this deterministic denial of service condition. The fix addresses the underlying concurrency model by implementing proper synchronization primitives that maintain the functionality while eliminating the race condition that could be exploited for service disruption attacks.

Responsible

GitHub M

Reservation

05/21/2026

Disclosure

08/04/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

low

Sources