Trigger.dev: Cross-tenant SQL injection in the TSQL query compiler (POST /api/v1/query) via unsanitized window-function name
A cross-tenant SQL injection vulnerability exists in trigger.dev's TSQL query compiler at the POST /api/v1/query endpoint. The vulnerability arises because the window-function name in the query is concatenated into the SQL string without allowlisting or escaping, allowing an authenticated customer to inject raw subqueries that bypass tenant isolation. This enables an attacker to read analytics data belonging to other tenants. The issue has been verified end-to-end against the real compiler and a live ClickHouse database.
AI Analysis
Technical Summary
The vulnerability is in the trigger.dev TSQL query compiler's handling of window-function names. While most user inputs are parameterized or escaped, the window-function name is concatenated raw into the SQL query without allowlist checks or escaping. The lexer accepts backtick-quoted identifiers, allowing injection of arbitrary SQL subqueries. Tenant isolation is enforced only on the outer table's WHERE clause, which does not apply to injected subqueries. Authenticated users can exploit this by crafting a window-function name containing a subquery that accesses another tenant's data. The vulnerability was demonstrated with a proof-of-concept that injected a subquery selecting data from another tenant's table, which executed successfully on a live ClickHouse instance.
Potential Impact
An authenticated trigger.dev customer can bypass tenant isolation and read analytics data belonging to other tenants. This results in unauthorized data disclosure across tenants, violating confidentiality. The vulnerability does not affect availability or integrity but allows high-severity data leakage.
Mitigation Recommendations
A patch is available for this vulnerability. Users should apply the official fix provided by trigger.dev to ensure the window-function name is properly validated or escaped to prevent injection. Until patched, avoid using the vulnerable query endpoint or restrict access to trusted users only. Check the vendor advisory for the latest remediation guidance.
Trigger.dev: Cross-tenant SQL injection in the TSQL query compiler (POST /api/v1/query) via unsanitized window-function name
Description
A cross-tenant SQL injection vulnerability exists in trigger.dev's TSQL query compiler at the POST /api/v1/query endpoint. The vulnerability arises because the window-function name in the query is concatenated into the SQL string without allowlisting or escaping, allowing an authenticated customer to inject raw subqueries that bypass tenant isolation. This enables an attacker to read analytics data belonging to other tenants. The issue has been verified end-to-end against the real compiler and a live ClickHouse database.
CVSS v3.1
Score 7.7high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability is in the trigger.dev TSQL query compiler's handling of window-function names. While most user inputs are parameterized or escaped, the window-function name is concatenated raw into the SQL query without allowlist checks or escaping. The lexer accepts backtick-quoted identifiers, allowing injection of arbitrary SQL subqueries. Tenant isolation is enforced only on the outer table's WHERE clause, which does not apply to injected subqueries. Authenticated users can exploit this by crafting a window-function name containing a subquery that accesses another tenant's data. The vulnerability was demonstrated with a proof-of-concept that injected a subquery selecting data from another tenant's table, which executed successfully on a live ClickHouse instance.
Potential Impact
An authenticated trigger.dev customer can bypass tenant isolation and read analytics data belonging to other tenants. This results in unauthorized data disclosure across tenants, violating confidentiality. The vulnerability does not affect availability or integrity but allows high-severity data leakage.
Mitigation Recommendations
A patch is available for this vulnerability. Users should apply the official fix provided by trigger.dev to ensure the window-function name is properly validated or escaped to prevent injection. Until patched, avoid using the vulnerable query endpoint or restrict access to trusted users only. Check the vendor advisory for the latest remediation guidance.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-9q4r-4842-93vw
- Osv Schema Version
- 1.4.0
- Ecosystems
- ["npm"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6ac139b2a43b0b3b89d69af6
Added to database: 10/03/2026, 17:21:54 UTC
Last enriched: 10/03/2026, 17:40:39 UTC
Last updated: 10/04/2026, 02:51:11 UTC
Views: 8
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.