Description
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.
Published: 2026-10-15
Score: 8.8 High
EPSS: < 1% Very Low
KEV: No
Impact: SQL Injection
Action: Immediate Patch
AI Analysis

Impact

The vulnerability lies in Tianji's getDateQuery() function, which builds raw SQL queries by directly inserting a timezone value supplied via request data or the timezone HTTP header. Because of the lack of parameter binding, an attacker can inject arbitrary SQL statements into the analytics queries, potentially retrieving sensitive information or altering database contents. The affected code enables any authenticated workspace member—including read‑only viewers—to trigger these queries, allowing attackers with a legitimate account to access the database through the web interface.

Affected Systems

The weakness affects the open‑source Tianji analytics platform provided by msgbyte. Versions prior to 1.31.29 are impacted; the issue was addressed in release v1.31.29. Users who have authenticated workspace members, even those with read‑only permissions, may invoke the vulnerable analytics endpoint and thereby reach the underlying database.

Risk and Exploitability

The CVSS score of 8.8 signals a high severity, yet the EPSS score of less than 1% indicates a low current exploitation probability. The vulnerability is not listed in CISA's KEV catalog. Attackers would need to obtain an authenticated workspace membership and send a crafted request that supplies a malicious timezone value, either via form data or HTTP header. Successful exploitation could lead to disclosure or modification of credentials, API keys, and tenant data, or degrade service availability.

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

  • Upgrade Tianji to version 1.31.29 or later where the raw SQL construction is replaced with parameter binding.
  • Revoke or restrict the ability of read‑only workspace members to invoke analytics queries, limiting the threat surface until the software can be updated.
  • Audit and refactor any remaining raw SQL construction to enforce parameterized queries, following industry best practices to prevent injection vulnerabilities.

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

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, 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.
Title Tianji: SQL Injection via unsanitized timezone parameter in analytics queries
Weaknesses CWE-89
References
Metrics cvssV3_1

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


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-21T01:02:29.450Z

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

Link: CVE-2026-55239

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Deferred

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

Modified: 2026-10-21T01:17:39.013

Link: CVE-2026-55239

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

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

Weaknesses
  • CWE-89

    Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')