Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain workspace admin access
-
DeliveryEmbed <% %> evaluate block in survey template
-
ExploitUnauthenticated user submits public survey
-
Executionlodash template() executes server-side JavaScript
-
ImpactAchieve command execution and secret disclosure
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V1 - Encoding and Sanitization Template injection prevention
|
| Exploitation Conditions | Exploitation requires an attacker with Tianji workspace-administrator privileges to store the payload: a lodash evaluate block written in the '<% code %>' form inside a survey feedTemplate (or a monitor notification template) handled by formatString() in src/server/utils/template.ts. It further requires that the survey feature is in use with a reachable public survey.submit endpoint, and that the default lodash evaluate pattern remains enabled (the default behavior in all versions prior to 1.31.29). Rendering - and thus code execution - is triggered when any unauthenticated user submits a survey response, so no victim admin interaction is needed to fire the payload. The key limiting factor is the workspace-admin requirement to plant the template; a purely external, unprivileged attacker cannot inject the code themselves. Fixed in 1.31.29. |
| Impact | The headline CVSS is 9.1 (Critical) with AV:N/AC:L/UI:N, which looks like a trivially-remotable RCE, but the single most important signal is PR:H: the attacker must already hold workspace-administrator privileges to store the malicious evaluate block in a survey feedTemplate or monitor notification template. That substantially tempers real-world risk - this is primarily a privilege-escalation / sandbox-escape for an already-trusted operator rather than a pre-auth internet-facing RCE. The S:C (scope change) and C:H/I:H/A:H are justified: server-side JavaScript runs in the Tianji Node.js process, escaping the logical workspace boundary to compromise the host and other tenants. No EPSS score, no CISA KEV listing, and no public exploit were supplied, so exploitation is 'no public exploit identified at time of analysis' and there is no evidence of active exploitation. Note a data caveat: the provided 'source code evidence' commit diff shows SQL-identifier-quoting (SQL injection) hardening in the AIGateway insights builder and a survey snapshot change - it does NOT actually show the SSTI fix (disabling the lodash evaluate pattern in formatString()), so the referenced commit appears to bundle multiple security fixes; the template fix itself is not visible in the supplied diff. Overall: a genuine high-severity flaw, but its real priority is bounded by the workspace-admin prerequisite and absence of any exploitation/EPSS/KEV signal. |
| Exploit ScenarioDerived | A malicious or compromised workspace administrator stores a survey feedback template containing a lodash evaluate block of the form '<% ...JavaScript... %>'. When any unauthenticated visitor submits a response via the public survey.submit endpoint, formatString() renders the template through lodash template() with the default evaluate pattern enabled, executing the attacker's JavaScript inside the Tianji Node.js process and yielding command execution, secret disclosure, or data tampering. No public proof-of-concept was identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 15, 2026
Server-side template injection in Tianji (msgbyte/tianji) before version 1.31.29 allows an attacker who already holds workspace-administrator privileges to execute arbitrary JavaScript inside the Tianji Node.js process by storing a lodash evaluate block ('<% code %>') in a survey feedTemplate or a monitor notification template. Because formatString() in src/server/utils/template.ts leaves the default lodash evaluate pattern enabled, the planted payload is rendered - and runs - when any unauthenticated user submits a response to the public survey.submit endpoint, so no victim administrator interaction is required to trigger it. The result can be command execution, secret disclosure, data modification, or service disruption; the vendor rates it CVSS 9.1 (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H), and the practical limiting factor is the workspace-admin prerequisite rather than any external exploitability. There is no public exploit identified at time of analysis and the issue is fixed in version 1.31.29.
RemediationAI
Vendor-released patch: upgrade to Tianji 1.31.29, which disables the unsafe template behavior; the fix is available via the project's release page at https://github.com/msgbyte/tianji/releases/tag/v1.31.29 and the commit at https://github.com/msgbyte/tianji/commit/132ff67907df897d222829ea8ad1a018ff74df48, with full details in advisory GHSA-5grg-j3cr-3hpm. Where immediate upgrading is not possible, the most effective compensating control is to remove the reachability of the render path: disable the survey feature or block access to the public survey.submit endpoint at the reverse proxy/WAF so unauthenticated submissions cannot cause a stored template to compile - the trade-off is that survey collection stops working until the upgrade. Additionally, review and clear any existing survey feedTemplates and monitor notification templates for '<%' evaluate blocks, since payloads already stored survive a code fix in the database and will execute again once rendering resumes; the trade-off is that legitimate templated notifications using that syntax must be rewritten. Tighten workspace-administrator membership, as the injection requires PR:H privileges to plant the payload - this reduces the number of insiders who can exploit it but does not eliminate the risk from a compromised or malicious admin account. Do not rely on input filtering of the '<%' sequence alone as a primary control, since lodash supports delimiter overrides and encoding variations; the fix in 1.31.29 or disabling the feature are the only durable mitigations.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The flaw is a server-side template injection (SSTI) mapped to CWE-1336, 'Improper Neutralization of Special Elements Used in a Template Engine'. Tianji's formatString() helper in src/server/utils/template.ts hands survey feedTemplate content and monitor notification templates directly to lodash's template() function without overriding the default template settings, which means the evaluate delimiter '<% ... %>' remains active alongside the interpolate delimiter. In lodash, any text between evaluate delimiters is compiled into the body of a generated JavaScript function, so a stored template is effectively arbitrary server-side JavaScript that executes in the same Node.js runtime as the Tianji application server. The trigger path is indirect: a workspace administrator persists the malicious template, and the code only compiles and runs when a survey template is rendered during a survey response submission on the public survey.submit endpoint - a route reachable by unauthenticated users. This makes the injection a stored, re-triggerable execution primitive rather than a one-shot request-based exploit, and because the runtime executes with the application's process privileges, access to application secrets, database credentials, and internal services follows from the same execution context. The CPE cpe:2.3:a:msgbyte:tianji:*:*:*:*:*:*:*:* applies to all releases before the fix, and the advisory and fix commit referenced in the CVE record (GHSA-5grg-j3cr-3hpm, commit 132ff67907df897d222829ea8ad1a018ff74df48, release tag v1.31.29) document the vendor's corrective change.
Know when Tianji gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
Planting the template needs workspace-admin control (PR:H), the network survey endpoint triggers rendering without interaction (AV:N/AC:L/UI:N), and server-side code execution escapes the workspace to the host process (S:C) with full C/I/A impact.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
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.
Articles & Coverage 1
Technical POC Analysis
CWE-1336, server-side template injection.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
A critical server-side template injection flaw in the Tianji monitoring and survey platform (msgbyte/tianji) lets anyone who already holds workspace-administrator rights plant code that runs inside the platform's own server process, with the trigger pulled automatically by ordinary public survey submissions. Because Tianji typically aggregates operational telemetry and holds integration secrets, a successful attack could expose credentials, corrupt survey or monitoring data, and take the platform offline - a disproportionate payoff for what is internally a single privileged account. Leadership should care because the barrier is an internal privilege level, not external exploitability, so the realistic threat is a malicious or compromised insider, a third-party integrator, or an attacker who has already escalated to workspace-admin through another vector.
Apply vendor patch - upgrade to Tianji 1.31.29 or later; note that vulnerability tracking data for CVE-2026-55240 lists no vendor patch as available, so confirm the fixed release with the vendor before relying on it. If upgrade cannot be completed immediately: disable or network-restrict the public survey.submit endpoint, scan and remove lodash evaluate blocks ('<%' ... '%>') from all survey feedTemplate and monitor notification template content, reduce and monitor the workspace-administrator population, run the Tianji Node.js process with least privilege and no access to production secrets or cloud credentials, rotate secrets held in the Tianji environment, and alert on anomalous template creation, role changes, child processes, and outbound connections from the Tianji host.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
EUVD-2026-102246
NVD
CVE.org
EPSS
GitHub
Exploit-DB