CVE-2026-55239: Tianji: SQL Injection via unsanitized timezone parameter in analytics queries
Tianji is an open source analytics, uptime monitoring, and server status platform. Prior to 1.31.29, the getDateQuery() function in src/server/utils/prisma.ts constructs raw SQL through Prisma.sql() by interpolating the timezone request value without parameter binding. The timezone value can reach affected analytics queries through request data or the timezone HTTP header, and workspaceProcedure permits any authenticated workspace member, including a read-only viewer, to reach those queries. An attacker can execute arbitrary SQL against the shared PostgreSQL database, which can disclose or modify credentials, API keys, and tenant data or make the service unavailable. This issue is fixed in version 1.31.29.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Tianjito a version that resolves this vulnerability.Fixed in 1.31.29
Event History
Frequently Asked Questions
Who can exploit this issue?
Any authenticated member of a Tianji workspace can reach the affected analytics queries, including users assigned a read-only viewer role. Exploitation does not require user interaction.
What input paths can carry the malicious value?
The vulnerable timezone value can be supplied through request data or the timezone HTTP header when affected analytics queries are reached.
Are default deployments affected?
The provided information does not identify any non-default configuration requirement. Affected versions prior to 1.31.29 expose the vulnerable query path to authenticated workspace members.
What is the impact if exploitation succeeds?
An attacker can execute arbitrary SQL against the shared PostgreSQL database. This can expose or alter credentials, API keys, and tenant data, or cause service unavailability.
How can this be remediated?
Upgrade Tianji to version 1.31.29, which fixes the issue.