# GHSA-jhmr-57cj-q6g9: Komari vulnerable to 2FA Authentication Bypass

- Severity: High (CVSS:4.0, scored by GitHub) `CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2025-08-12T00:13:36.000Z
- Modified: 2026-03-03T04:56:48.464Z
- Also known as: GO-2025-3873
- Weaknesses: CWE-287

## Description

### Summary

Logic error in 2FA verification condition allows bypass of two-factor authentication

### Details

https://github.com/komari-monitor/komari/blob/bd5a6934e1b79a12cf1e6a9bba5372d0e04f3abc/api/login.go#L55

There is no way for `Verify2Fa` to return an error **AND** true as `ok` at the same time, any codes are considered as valid.

### PoC

Use any 6 digits as 2FA code

### Impact

Bypass 2FA Authentication

(As written by GitHub Advisory Database.)

## Affected

- github.com/komari-monitor/komari (Go): before 0.0.0-20250809064056-cc3d54bff4c6

## References

- <https://github.com/komari-monitor/komari/security/advisories/GHSA-jhmr-57cj-q6g9> (advisory, web)
- <https://github.com/komari-monitor/komari/commit/cc3d54bff4c6495beaa1c7483379cd04542c557f> (fix, web)
- <https://github.com/komari-monitor/komari> (package)
- <https://github.com/komari-monitor/komari/blob/bd5a6934e1b79a12cf1e6a9bba5372d0e04f3abc/api/login.go#L55> (web)
- <https://github.com/komari-monitor/komari/releases/tag/1.0.4-fix1> (web)

## Sources

- GitHub Advisory Database: [GHSA-jhmr-57cj-q6g9](https://github.com/advisories/GHSA-jhmr-57cj-q6g9), CC-BY-4.0, modified 2025-08-18
- Go Vulnerability Database: [GO-2025-3873](https://pkg.go.dev/vuln/GO-2025-3873), CC-BY-4.0, modified 2026-03-03

---

Page: https://cve.day/GHSA-jhmr-57cj-q6g9 · Whole record: https://cve.day/GHSA-jhmr-57cj-q6g9.json · Rebuilt by cve.day 2026-11-25T22:56:24.115Z
