GHSA-jhmr-57cj-q6g9

Suggest an improvement
Source
https://github.com/advisories/GHSA-jhmr-57cj-q6g9
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/08/GHSA-jhmr-57cj-q6g9/GHSA-jhmr-57cj-q6g9.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-jhmr-57cj-q6g9
Aliases
Published
2025-08-12T00:13:36Z
Modified
2025-08-18T13:57:31Z
Severity
  • 8.5 (High) CVSS_V4 - 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 CVSS Calculator
Summary
Komari vulnerable to 2FA Authentication Bypass
Details

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

Database specific
{
    "cwe_ids":  [
        "CWE-287"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2025-08-12T00:13:36Z",
    "nvd_published_at":  null,
    "severity":  "HIGH"
}
References

Affected packages

Go / github.com/komari-monitor/komari

Package

Name
github.com/komari-monitor/komari
View open source insights on deps.dev
Purl
pkg:golang/github.com/komari-monitor/komari

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
0.0.0-20250809064056-cc3d54bff4c6

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/08/GHSA-jhmr-57cj-q6g9/GHSA-jhmr-57cj-q6g9.json"