CVE-2026-55239

Tianji: SQL Injection via unsanitized timezone parameter in analytics queries

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

Analysis

AI-generated

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

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

{'options': {'Automatable': 'no', 'Exploitation': 'none', '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, 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'}

Weaknesses
  • CWE-89

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

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 21, 2026, 1:02 AM
Reserved
Jun 16, 2026, 4:44 PM
Status
Deferred
Published
Oct 15, 2026, 7:17 PM
Modified
Oct 21, 2026, 1:17 AM