Tianji
Tianji: Remote Code Execution via lodash template evaluate pattern in survey feed templates
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 1.31.29
Fixed in 1.31.29
Mitigation
Upgrade tianji to 1.31.29 or later.
References
- Vendor advisory github.com/msgbyte/tianji/security/advisories/…
- Patch github.com/msgbyte/tianji/commit/132ff67907df8…
- Release notes github.com/msgbyte/tianji/releases/tag/v1.31.2…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.