Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. trigger.dev
  4. ›
  5. GHSA-9q4r-4842-93vw

GHSA-9q4r-4842-93vw: Trigger.dev: Cross-tenant SQL injection in the TSQL query compiler (POST /api/v1/query) via unsanitized window-function name

October 2, 2026

A cross-tenant SQL injection in the TSQL query compiler lets any authenticated trigger.dev customer read every other tenant’s analytics data. The customer-facing query endpoint POST /api/v1/query accepts a TSQL/TRQL query that is compiled to ClickHouse SQL by internal-packages/tsql. The compiler parameterizes or escapes all user input and injects a per-tenant WHERE guard — except the window-function name, which is concatenated into the SQL string with no allowlist and no escaping. By smuggling a backtick-quoted identifier into that position, an attacker injects a raw subquery (e.g. (SELECT ... FROM task_runs_v2 WHERE organization_id = 'org_VICTIM')) that sits outside the tenant guard, exfiltrating another organization’s rows. Verified end-to-end against the real compiler and a live ClickHouse.

References

  • github.com/advisories/GHSA-9q4r-4842-93vw
  • github.com/triggerdotdev/trigger.dev/commit/6997aeb05e27d2db47f9eda01fdc8a17c81a1ae0
  • github.com/triggerdotdev/trigger.dev/pull/4316
  • github.com/triggerdotdev/trigger.dev/releases/tag/v4.5.6
  • github.com/triggerdotdev/trigger.dev/security/advisories/GHSA-9q4r-4842-93vw

Code Behaviors & Features

Detect and mitigate GHSA-9q4r-4842-93vw with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 4.5.6

Fixed versions

  • 4.5.6

Solution

Upgrade to version 4.5.6 or above.

Impact 7.7 HIGH

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-639: Authorization Bypass Through User-Controlled Key
  • CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Source file

npm/trigger.dev/GHSA-9q4r-4842-93vw.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 03 Oct 2026 12:16:43 +0000.