Description
Tianji is an open source analytics, uptime monitoring, and server status platform. Prior to 1.31.29, formatString() in src/server/utils/template.ts passes survey feedTemplate and monitor notification templates to lodash template(), while the default evaluate pattern remains enabled. A workspace administrator can store an evaluate block using the <% code %> form, and the public survey.submit endpoint renders a survey template when an unauthenticated user submits a response. The compiled template executes server-side JavaScript in the Tianji Node.js process, allowing command execution, secret disclosure, data modification, or service disruption. This issue is fixed in version 1.31.29.
Published: 2026-10-15
Score: 9.1 Critical
EPSS: < 1% Very Low
KEV: No
Impact: Remote Code Execution
Action: Patch Immediately
AI Analysis

Impact

Tianji, an open source analytics platform, contains a vulnerability in its template engine where the default evaluate pattern remains active. This permits a workspace administrator to embed arbitrary JavaScript code in survey feed templates using the <% code %> syntax. When an unauthenticated user submits a survey response, the server renders the template and executes the code within the Node.js process. As a result, an attacker can run system commands, exfiltrate secrets, modify data, or cause service disruption. The weakness is classified as CWE‑1336, which highlights improper handling of template evaluation leading to code execution. The described impact is therefore complete loss of confidentiality, integrity and availability on an affected server.

Affected Systems

All installations of Tianji with a version earlier than 1.31.29 are vulnerable. The issue was identified in the template code within src/server/utils/template.ts, which processes survey feedTemplate and monitor notification templates before reaching the 1.31.29 release. Administrators controlling a workspace can deploy malicious template content, and any unauthenticated submitter may trigger its execution. Version 1.31.29 and subsequent releases have applied the fix.

Risk and Exploitability

The CVSS score of 9.1 indicates critical severity, while the EPSS score of less than 1% suggests a low likelihood of exploitation in the wild at this time. The vulnerability is not yet listed in the CISA KEV catalog, which implies no confirmed exploit has been reported. The likely attack vector is via the public survey.submit endpoint, where an unauthenticated request to submit survey data triggers server-side rendering of a malicious template. The exploit requires that the attacker can influence the template content; this is feasible for a workspace administrator or any user able to submit a survey with a crafted template.

Generated by OpenCVE AI on October 16, 2026 at 17:46 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the official patch by upgrading Tianji to version 1.31.29 or later
  • Restrict or block unauthenticated access to the survey.submit endpoint to prevent template rendering by external users
  • Disable the default lodash evaluate pattern in any custom template configuration, ensuring that template code cannot execute server-side JavaScript

Generated by OpenCVE AI on October 16, 2026 at 17:46 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 28 Oct 2026 22:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Mon, 19 Oct 2026 13:15:00 +0000

Type Values Removed Values Added
First Time appeared Msgbyte
Msgbyte tianji
Vendors & Products Msgbyte
Msgbyte tianji

Thu, 15 Oct 2026 18:30:00 +0000

Type Values Removed Values Added
Description Tianji is an open source analytics, uptime monitoring, and server status platform. Prior to 1.31.29, formatString() in src/server/utils/template.ts passes survey feedTemplate and monitor notification templates to lodash template(), while the default evaluate pattern remains enabled. A workspace administrator can store an evaluate block using the <% code %> form, and the public survey.submit endpoint renders a survey template when an unauthenticated user submits a response. The compiled template executes server-side JavaScript in the Tianji Node.js process, allowing command execution, secret disclosure, data modification, or service disruption. This issue is fixed in version 1.31.29.
Title Tianji: Remote Code Execution via lodash template evaluate pattern in survey feed templates
Weaknesses CWE-1336
References
Metrics cvssV3_1

{'score': 9.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-28T20:04:59.360Z

Reserved: 2026-06-16T16:44:00.624Z

Link: CVE-2026-55240

cve-icon Vulnrichment

Updated: 2026-10-28T20:04:32.282Z

cve-icon NVD

Status : Deferred

Published: 2026-10-15T19:17:40.290

Modified: 2026-10-28T20:18:08.730

Link: CVE-2026-55240

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-19T12:56:39Z

Weaknesses
  • CWE-1336

    Improper Neutralization of Special Elements Used in a Template Engine