GHSA-jhmr-57cj-q6g9: Komari vulnerable to 2FA Authentication Bypass
N/A
Basic Information
Technical Details
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| github.com/komari-monitor/komari | go | < 0.0.0-20250809064056-cc3d54bff4c6 | 0.0.0-20250809064056-cc3d54bff4c6 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The analysis of the provided commit cc3d54bff4c6495beaa1c7483379cd04542c557f clearly indicates a logical flaw in the Login function within the api/login.go file. The patch directly modifies the conditional statement responsible for verifying the 2FA code. The original condition err != nil && ok was incorrect because the Verify2Fa function would never return both an error and a success status (ok=true) at the same time. This effectively rendered the 2FA check useless, as the block of code that would reject an invalid code was unreachable. The fix, changing the condition to err != nil || !ok, correctly handles both error scenarios and unsuccessful verification, thus patching the 2FA bypass vulnerability. Therefore, the Login function is the direct site of the vulnerability.