CVE-2026-55240

Tianji: Remote Code Execution via lodash template evaluate pattern in survey feed templates

Published Oct 15, 2026 CVSS 3.1 · 9.1 Critical EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

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

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 available
History
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
First Time appeared Msgbyte
Msgbyte tianji
Vendors & Products Msgbyte
Msgbyte tianji
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'}

Weaknesses
  • CWE-1336

    Improper Neutralization of Special Elements Used in a Template Engine

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 28, 2026, 8:04 PM
Reserved
Jun 16, 2026, 4:44 PM
Status
Deferred
Published
Oct 15, 2026, 7:17 PM
Modified
Oct 28, 2026, 8:18 PM