GHSA-vffh-c9pq-4crh: Uptime kuma Uptime Kuma Server-side Template Injection Vulnerability

MODERATE
CVSS 6.5
CWE-36 CWE-1336
Published
Advisory Summary

GHSA-vffh-c9pq-4crh is a MODERATE (CVSS 6.5) uptime kuma server-side template injection vulnerability (CWE-36: Absolute Path Traversal) affecting Uptime kuma libraries in the npm ecosystem. The issue involves uptime kuma server-side template injection (ssti) in notification templates allows arbitrary file read. Remediation is available in the latest vendor maintenance releases.

GHSA-vffh-c9pq-4crh at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-vffh-c9pq-4crh
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-36: Absolute Path Traversal
Affected Product Uptime kuma
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix GHSA-vffh-c9pq-4crh

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

uptime-kuma fixed: Latest secure release
npm install uptime-kuma@Latest secure release
Verify Direct and Transitive Dependencies

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

npm ls uptime-kuma

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-vffh-c9pq-4crh, inspect your project dependencies using npm:

npm ls uptime-kuma

Analyze the terminal output to locate any version of Uptime kuma in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The npm ls uptime-kuma command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-36: Absolute Path Traversal, where the product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize absolute path sequences such as "/abs/path" that can resolve to a location that is outside of that directory. In Uptime kuma, 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 In some Notification types (e.g., Webhook, Telegram), the `send()` function allows user-controlled renderTemplate input. This leads to a Server-side Template Injection (SSTI) vulnerability that can be exploited to read arbitrary files from the server. ### Details The root cause is how Uptime Kuma renders user-controlled templates via `renderTemplate()`. The function instantiates a Liquid template engine and parses the `template` argument without sanitization: ```js async renderTemplate(template, msg, monitorJSON, heartbeatJSON) { const engine = new Liquid(); const parsedTpl = engine.parse(template); // ... } ``` In some Notification flows, the `send()` implementation passes user-editable fields directly into `renderTemplate()`: ```js // webhook.js if (notification.webhookContentType === "form-data") { const formData = new FormData(); formData.append("data", JSON.stringify(data)); config.headers = formData.getHeaders(); data = formData; } else if (notification.webhookContentType === "custom") { data = await this.renderTemplate(notification.webhookCustomBody, msg, monitorJSON, heartbeatJSON); //<- this line cause SSTI } ``` Because `notification` can be edited by users and is rendered by the Liquid engine without proper sandboxing or a whitelist of allowed operations, an attacker can supply a crafted template that causes the server to read arbitrary files. In particular, Liquid’s template tags (e.g. `{% render ... %}`) can be abused to include server-side files if the engine is not restricted, resulting in Server-side Template Injection (SSTI) that leaks sensitive file contents. ### PoC 1. Open Uptime Kuma → **Notifications** → **Add** or **Edit** an existing Webhook notification. 2. Set notification type to **Webhook** and set **Request Body** to **Custom Body**. 3. Paste the following JSON into the custom request body: ```json { "Title": {% render '/etc/passwd' %} } ``` 4. Click test. 5. Your webhook will receive the file content ### Impact This is a post-authentication Server-side Template Injection (SSTI) vulnerability that allows an authenticated user to perform arbitrary file read on the server.

GHSA-vffh-c9pq-4crh Affected Uptime kuma Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
uptime-kuma
npm
2.0.0-dev.0
All 1 versions
2.0.0-dev.0
None specified

References

Frequently Asked Questions

What is GHSA-vffh-c9pq-4crh?
GHSA-vffh-c9pq-4crh is a security vulnerability in Uptime kuma involving Uptime Kuma Server-side Template Injection (SSTI) in Notification Templates Allows Arbitrary File Read under CWE-36: Absolute Path Traversal.
Which Uptime kuma versions are affected?
Affected versions include releases prior to current release patches across affected packages: uptime-kuma.
What version fixes GHSA-vffh-c9pq-4crh?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is uptime-kuma affected?
Yes, uptime-kuma is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of GHSA-vffh-c9pq-4crh?
GHSA-vffh-c9pq-4crh has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with GHSA-vffh-c9pq-4crh?
GHSA-vffh-c9pq-4crh is classified under CWE-36: Absolute Path Traversal (The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize absolute path sequences such as "/abs/path" that can resolve to a location that is outside of that directory.).
How can I check npm dependencies for GHSA-vffh-c9pq-4crh?
Run the dependency tree command: 'npm ls uptime-kuma'. 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-vffh-c9pq-4crh",
  "modified" : "2025-10-20T20:03:15Z",
  "published" : "2025-10-20T20:03:15Z",
  "aliases" : [ ],
  "summary" : "Uptime Kuma Server-side Template Injection (SSTI) in Notification Templates Allows Arbitrary File Read",
  "details" : "### Summary\n\nIn some Notification types (e.g., Webhook, Telegram), the `send()` function allows user-controlled renderTemplate input. This leads to a Server-side Template Injection (SSTI) vulnerability that can be exploited to read arbitrary files from the server.\n\n\n\n### Details\n\nThe root cause is how Uptime Kuma renders user-controlled templates via `renderTemplate()`. The function instantiates a Liquid template engine and parses the `template` argument without sanitization:\n\n```js\nasync renderTemplate(template, msg, monitorJSON, heartbeatJSON) {\n    const engine = new Liquid();\n    const parsedTpl = engine.parse(template);\n\n    // ...\n}\n```\n\nIn some Notification flows, the `send()` implementation passes user-editable fields directly into `renderTemplate()`:\n```js\n// webhook.js\nif (notification.webhookContentType === \"form-data\") {\n    const formData = new FormData();\n    formData.append(\"data\", JSON.stringify(data));\n    config.headers = formData.getHeaders();\n    data = formData;\n} else if (notification.webhookContentType === \"custom\") {\n    data = await this.renderTemplate(notification.webhookCustomBody, msg, monitorJSON, heartbeatJSON); //<- this line cause SSTI\n}\n```\n\nBecause `notification` can be edited by users and is rendered by the Liquid engine without proper sandboxing or a whitelist of allowed operations, an attacker can supply a crafted template that causes the server to read arbitrary files. In particular, Liquid’s template tags (e.g. `{% render ... %}`) can be abused to include server-side files if the engine is not restricted, resulting in Server-side Template Injection (SSTI) that leaks sensitive file contents.\n\n\n\n### PoC\n\n1. Open Uptime Kuma → **Notifications** → **Add** or **Edit** an existing Webhook notification.\n2. Set notification type to **Webhook** and set **Request Body**  to **Custom Body**.\n3. Paste the following JSON into the custom request body:\n\n```json\n{\n  \"Title\": {% render '/etc/passwd' %}\n}\n```\n\n4. Click test.\n5. Your webhook will receive the file content\n\n\n\n### Impact\n\nThis is a post-authentication Server-side Template Injection (SSTI) vulnerability that allows an authenticated user to perform arbitrary file read on the server.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "uptime-kuma"
    },
    "versions" : [ "2.0.0-dev.0" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/louislam/uptime-kuma/security/advisories/GHSA-vffh-c9pq-4crh"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/louislam/uptime-kuma"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1336", "CWE-36" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-10-20T20:03:15Z",
    "nvd_published_at" : null
  }
}