Skip to main content
Vulnerability Database/CVE-2026-97737

CVE-2026-97737: Wakapi Authentication Bypass Vulnerability

CVE-2026-97737 is an authentication bypass flaw in Wakapi that exploits the user caching service to resolve lookups in unintended contexts, enabling account takeover. This article covers technical details, affected versions, security impact, and recommended mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-97737 Overview

CVE-2026-97737 is an account takeover vulnerability in Wakapi, a self-hosted coding time tracker compatible with WakaTime. Versions prior to 2.17.6 contain a flaw in the user caching service where a lookup can be resolved in an unintended lookup context. The underlying weakness is a type confusion issue [CWE-843] caused by shared cache keys across different lookup operations. An unauthenticated network attacker can leverage this behavior to assume the identity of another user, resulting in unauthorized access to that user's account and tracked data.

Critical Impact

Successful exploitation allows an unauthenticated attacker to take over arbitrary Wakapi user accounts, exposing coding activity data and granting access to API endpoints under the victim's identity.

Affected Products

  • Wakapi versions prior to 2.17.6
  • Self-hosted Wakapi instances exposed to untrusted networks
  • Deployments relying on the vulnerable user caching service in services/user.go

Discovery Timeline

  • 2026-09-25 - CVE-2026-97737 published to NVD
  • 2026-09-30 - Last updated in NVD database

Technical Details for CVE-2026-97737

Vulnerability Analysis

Wakapi caches user records in memory to reduce database load during API request processing. The caching service in services/user.go previously used the raw userId string as the cache key for lookups by user ID. However, the same cache instance was used for other lookup operations keyed by different attributes, such as email or API key. Because these keys shared the same namespace, a lookup performed in one context could return a record cached under an unrelated context, yielding a different user object than the caller expected. An attacker who can influence identifier values submitted to the service can cause the cache to return a victim's user record, resulting in account takeover.

Root Cause

The root cause is a type confusion flaw [CWE-843] rooted in a shared, unprefixed cache keyspace. Multiple distinct lookup paths wrote and read entries using identifier values without any discriminator indicating the lookup type. The fix introduces a per-context key prefix so that id-based lookups cannot collide with lookups performed by email, API key, or other attributes.

Attack Vector

Exploitation is performed remotely over the network without authentication or user interaction. The attack requires specific preconditions regarding cache state and the ordering of lookup operations, which is reflected in the high attack complexity. The resulting impact includes confidentiality and integrity compromise of targeted accounts.

go
// Patch excerpt from services/user.go
// Before: cache lookup used the raw userId, colliding with other key contexts
// After: a context-specific prefix isolates id-based lookups

		return nil, errors.New("user id must not be empty")
	}

-	if u, ok := srv.cache.Get(userId); ok {
+	cacheKey := fmt.Sprintf("id_%s", userId)
+	if u, ok := srv.cache.Get(cacheKey); ok {
		return u.(*models.User), nil
	}

Source: GitHub Commit ce91eac

The patch namespaces id-based lookups with an id_ prefix, preventing cross-context cache collisions that previously enabled account takeover.

Detect Identity Attacks the Moment Authentication Fails

Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.

Stop Identity Attacks

Detection Methods for CVE-2026-97737

Indicators of Compromise

  • Unexpected successful API requests attributed to a user from unfamiliar IP addresses or user agents.
  • Access to coding activity data or heartbeats that does not correlate with the legitimate user's active sessions.
  • Audit log entries showing user profile reads or writes without preceding authentication events for that account.

Detection Strategies

  • Review application logs for anomalous sequences where lookups by email or API key immediately precede id-based requests resolving to a different account.
  • Correlate HTTP access logs with authenticated user identifiers to detect mismatches between the credential presented and the account acted upon.
  • Monitor for abnormal request volume against user lookup and profile endpoints that could indicate cache priming attempts.

Monitoring Recommendations

  • Enable verbose logging in Wakapi for authentication and user resolution paths until all instances are upgraded to 2.17.6 or later.
  • Forward Wakapi application and reverse-proxy logs to a centralized SIEM for retention and correlation.
  • Alert on repeated requests that mix different identifier types (email, API key, user id) from the same client within short time windows.

How to Mitigate CVE-2026-97737

Immediate Actions Required

  • Upgrade all Wakapi deployments to version 2.17.6 or later without delay.
  • Rotate API keys for all users after upgrading, since prior keys may have been exposed through account takeover.
  • Audit access logs for the period preceding the upgrade to identify any suspicious user resolution activity.

Patch Information

The fix is included in Wakapi 2.17.6. The patch in services/user.go introduces context-specific cache key prefixes (for example, id_<userId>) to prevent cross-context cache collisions. See the GitHub Security Advisory GHSA-x48w-3rq3-w2pq and the Wakapi 2.17.6 Release Notes for release details.

Workarounds

  • Restrict network exposure of Wakapi instances to trusted users via VPN, reverse-proxy authentication, or IP allowlisting until the upgrade is applied.
  • Disable or restrict account registration on public-facing instances to limit the pool of identifiers an attacker can introduce into the cache.
  • Reduce or disable the user cache's time-to-live where configurable to shrink the window in which collisions can be exploited.
bash
# Upgrade a Docker-based Wakapi deployment to the patched release
docker pull ghcr.io/muety/wakapi:2.17.6
docker stop wakapi && docker rm wakapi
docker run -d --name wakapi \
  -p 3000:3000 \
  -v /opt/wakapi/config.yml:/app/config.yml \
  ghcr.io/muety/wakapi:2.17.6

# Verify the running version
curl -s http://localhost:3000/api/health

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.