CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-9Q4R-4842-93VW

GHSA-9Q4R-4842-93VW: Cross-Tenant SQL Injection in Trigger.dev TSQL Query Compiler

Alon Barad
Alon Barad
Software Engineer

Oct 3, 2026·6 min read·15 visits

Executive Summary (TL;DR)

Authenticated cross-tenant SQL injection in Trigger.dev via unsanitized window-function names in the TSQL compiler allows unauthorized extraction of other organizations' data.

A critical cross-tenant SQL injection vulnerability exists in the TSQL query compiler of Trigger.dev, allowing authenticated users to bypass tenant isolation boundaries and read arbitrary ClickHouse analytics logs and execution payloads belonging to other organizations.

Vulnerability Overview

The Trigger.dev platform implements a custom query language interface (TSQL/TRQL) exposed at the POST /api/v1/query endpoint to allow developers to query task execution analytics and run logs. This query language undergoes compilation into raw ClickHouse SQL through an internal parsing and printing package (internal-packages/tsql).

While the compiler applies sanitization, parameter binding, and mandatory tenant-scoping filters to standard queries, it fails to sanitize or validate window function names. This omission exposes an attack surface where any authenticated user can bypass tenant boundaries and exfiltrate database records belonging to other tenants.

This vulnerability is classified under CWE-89 (Improper Neutralization of Special Elements used in an SQL Command) and CWE-639 (Authorization Bypass Through User-Controlled Key). The flaw permits direct read-access to the underlying ClickHouse database containing sensitive customer payloads, environment variables, and execution parameters.

Root Cause Analysis

The root cause of the vulnerability lies in the implementation of the visitWindowFunction AST node printer within internal-packages/tsql/src/query/printer.ts. When formatting window functions for the final ClickHouse query, the printer directly concatenates the node.name property into the raw SQL string without any escaping or validation checks.

While typical SQL functions are restricted to an allowlist of valid names, the TSQL compiler does not enforce such constraints for window functions. Furthermore, the TSQL lexer permits backtick-quoted identifiers, which are intended to let developers use special characters in column names. When processing backticks, the lexer strips the quotes and unescapes the inner string, passing the raw string as the function name to the AST.

By enclosing a malicious SQL fragment containing a subquery within backticks in the window function position, an attacker can break out of the analytical query context. The automatically generated tenant isolation guard (enforcedWhereClause) is only applied to the WHERE clause of the outer table. The injected subquery executes within the SELECT context as an independent expression, entirely unaffected by the outer query's isolation limits.

Code Analysis

The vulnerable code path handles the WindowFunction AST node by generating an unvalidated string representation of the function call. Below is the code implementation prior to the fix:

// Vulnerable implementation in internal-packages/tsql/src/query/printer.ts
private visitWindowFunction(node: WindowFunction): string {
  const args = node.args ? node.args.map((a) => this.visit(a)) : [];
  // node.name is concatenated directly into the query string without sanitization
  const funcCall = `${node.name}(${args.join(", ")})`;
 
  if (node.over_identifier) {
    return `${funcCall} OVER ${this.printIdentifier(node.over_identifier)}`;
  }
  // ...
}

In the patched version, the maintainers introduced strict allowlist validation using findTSQLFunction and findTSQLAggregation. This validation maps the input function name against a registry of safe analytical functions and retrieves the corresponding safe ClickHouse name:

// Patched implementation in internal-packages/tsql/src/query/printer.ts
private visitWindowFunction(node: WindowFunction): string {
  // Validate the function name against the allowlist and resolve it to its safe ClickHouse name
  const funcMeta = findTSQLFunction(node.name) ?? findTSQLAggregation(node.name);
  if (!funcMeta) {
    throw new QueryError(`Unknown function: ${node.name}`);
  }
 
  const args = node.args ? node.args.map((a) => this.visit(a)) : [];
  const funcCall = `${funcMeta.clickhouseName}(${args.join(", ")})`;
 
  if (node.over_identifier) {
    return `${funcCall} OVER ${this.printIdentifier(node.over_identifier)}`;
  }
  // ...
}

This remediation completely closes the vulnerability by rejecting any unauthorized or malformed window function name prior to database execution.

Exploitation Methodology

An exploitation flow requires the attacker to possess valid standard API credentials or a JWT to authenticate to the POST /api/v1/query endpoint. This prerequisite is low-complexity since any legitimate tenant on a self-hosted or cloud-hosted instance of Trigger.dev can perform the request.

The attacker constructs a TSQL payload targeting their own task_runs table, which satisfies the initial authorization checks. Inside the projection list of the SELECT statement, the attacker introduces a window function definition with a name enclosed in backticks. The backtick string encapsulates the malicious subquery payload.

During processing, the compiler compiles this node into a raw ClickHouse subquery. Because ClickHouse executes subqueries in the SELECT list independently, the database retrieves records from other tables (e.g., trigger_dev.task_runs_v2) for any specified organization_id. The resulting dataset containing the exfiltrated sensitive data is mapped to an alias and returned in the HTTP response.

Here is a sequence diagram of the exploitation process:

Impact Assessment

The security impact of this vulnerability is significant, as it completely breaks the multi-tenant isolation model of Trigger.dev. An attacker can run arbitrary read-only queries against the analytical database, compromising the confidentiality of all tenant data stored within the ClickHouse instance.

This data includes historical task runs, execution payloads, logs, internal environment variables, API secret keys, and customer database passwords processed during job executions. In worst-case scenarios, the exposed payloads can leak highly sensitive credentials, leading to secondary compromises of connected systems.

Since this is an SQL injection targeting ClickHouse, write operations or local file system access are generally restricted by the database engine permissions. However, the complete disclosure of execution records makes this a high-severity incident with CVSS score 7.7 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N).

Remediation & Detection Guidance

To remediate this vulnerability, self-hosted and cloud operators must immediately upgrade their deployments to version 4.5.6 or later. This release incorporates the official validation patch that terminates compilation if an unrecognized window function name is supplied.

In environments where upgrading is delayed, Web Application Firewalls (WAFs) can be deployed to inspect traffic hitting the POST /api/v1/query endpoint. Security teams should implement rules to search the query payload for backticks combined with typical SQL keywords such as SELECT, FROM, or WHERE within the identifier block.

Additionally, database logs for ClickHouse should be continuously audited for queries executing against the task_runs_v2 table that contain mismatching organization_id fields or multiple nested SELECT queries containing the string OVER with non-standard functions.

Technical Appendix

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

Affected Systems

Trigger.dev self-hosted platformsTrigger.dev cloud service

Affected Versions Detail

Product
Affected Versions
Fixed Version
trigger.dev
Trigger.dev
<= 4.5.54.5.6
AttributeDetail
CWE IDCWE-89, CWE-639
Attack VectorNetwork
CVSS Score7.7 (High)
Exploit StatusProof of Concept (PoC) available
KEV StatusNot Listed
ImpactCross-tenant data exfiltration

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1005Data from Local System
Collection
T1119Automated Collection
Collection
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

The software constructs an SQL command using unsanitized input that allows an attacker to alter the query structure.

Known Exploits & Detection

GitHub Security AdvisoryContains detailed instructions and full TSQL query payload demonstrating cross-tenant exfiltration

Vulnerability Timeline

Vulnerability reported internally / security advisory drafted
2026-07-08
Patch developed and committed to repository
2026-07-21
Security advisory published to GitHub Advisory Database
2026-10-02

References & Sources

  • [1]GitHub Security Advisory GHSA-9q4r-4842-93vw
  • [2]Repository Advisory for GHSA-9q4r-4842-93vw
  • [3]Fix Pull Request #4316
  • [4]Fix Patch Commit 6997aeb05e27d2db47f9eda01fdc8a17c81a1ae0
  • [5]Release Tag v4.5.6

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2026-63634
6.9

CVE-2026-63634: EVM Calldata Padding Gas Drainage in pympp Fee-Payer Verification

CVE-2026-63634 is an improper input validation vulnerability (CWE-20) in pympp, the official Python SDK for the Machine Payments Protocol (MPP) developed by tempoxyz. In versions prior to 0.9.1, servers acting as transaction fee payers validate incoming Ethereum Virtual Machine (EVM) transaction calldata using minimum-length thresholds rather than exact byte-length assertions. Because EVM smart contract dispatchers ignore trailing unparsed bytes while the protocol charges intrinsic gas for every byte in a transaction payload, an unauthenticated attacker can append thousands of non-zero padding bytes to legitimate payment requests. The server cosigns and broadcasts the oversized transaction, forcing the fee-payer wallet to expend inflated gas costs up to the policy limit and depleting its native token reserves.

Amit Schendel
Amit Schendel
1 views•11 min read
•about 2 hours ago•CVE-2026-14265
7.5

CVE-2026-14265: Remote Code Execution via Unsafe Deserialization in AWS Advanced JDBC Wrapper

CVE-2026-14265 (GHSA-c5q4-97jw-jggh) is a high-severity Remote Code Execution (RCE) vulnerability in the Amazon Web Services (AWS) Advanced JDBC Wrapper versions 3.3.0 through 4.0.0. The defect resides in the `RemoteQueryCachePlugin` and its underlying `CachedResultSet` implementation, which uses an unfiltered `java.io.ObjectInputStream` to deserialize cached SQL query results retrieved from external Redis or Valkey backends. An attacker with write access to the shared cache infrastructure can inject serialized Java gadget chains into cache keys, achieving arbitrary code execution within the JVM context of any application server consuming the cached entries.

Amit Schendel
Amit Schendel
2 views•10 min read
•about 3 hours ago•CVE-2026-63672
6.1

CVE-2026-63672: User-Controlled Identity Provider Selection in EGroupware SAML Authentication

CVE-2026-63672 is an open redirect and insecure Identity Provider (IdP) selection vulnerability in the SAML Single Sign-On (SSO) authentication module of EGroupware. In affected versions, the login method in api/src/Auth/Saml.php accepts an unauthenticated HTTP request parameter (idp) and passes it to the underlying SimpleSAMLphp library after only verifying that the string begins with https://. Because the input is not validated against the application's configured whitelist of trusted identity providers, an attacker can construct a malicious link that redirects authenticating users to an arbitrary, attacker-controlled SAML Identity Provider.

Amit Schendel
Amit Schendel
4 views•9 min read
•about 4 hours ago•CVE-2026-62336
8.5

CVE-2026-62336: Local Privilege Escalation via Symlink Following in qbee-agent

CVE-2026-62336 (GHSA-xhv5-8fpq-g7hf) is a high-severity local privilege escalation, arbitrary file overwrite, and denial-of-service vulnerability in qbee-agent, the client daemon for the qbee.io IoT device management platform. Prior to version 2026.27, the root-privileged agent failed to validate path components against symbolic links during directory creation and file opening operations in app/configuration/file_manager.go. Local unprivileged users can exploit this flaw by planting symlinks in user-controlled configuration paths or predictable temporary staging locations, causing the daemon to overwrite, truncate, or change ownership of sensitive root-owned system files.

Amit Schendel
Amit Schendel
4 views•10 min read
•about 5 hours ago•CVE-2026-110782
8.7

CVE-2026-110782: Cryptographic Signature Verification Bypass and Cross-IdP Impersonation in SimpleSAMLphp SAML2

CVE-2026-110782 is an authentication bypass and cryptographic signature verification failure in the SimpleSAMLphp SAML2 library (simplesamlphp/saml2). Resulting from an incomplete fix for CVE-2026-49283, the HTTP-Artifact binding implementation verifies the outer ArtifactResponse signature but unconditionally returns unsigned embedded SAML Responses without verifying signatures or validating that the embedded issuer matches the artifact issuer. In multi-IdP federation environments, an attacker controlling one trusted Identity Provider (IdP) can forge arbitrary identity assertions claiming to originate from another trusted IdP.

Amit Schendel
Amit Schendel
5 views•11 min read
•about 6 hours ago•CVE-2026-110789
7.5

CVE-2026-110789: Pre-Authentication Denial of Service via ASN.1 DER Length Parsing in js-libp2p (@libp2p/crypto)

CVE-2026-110789 (GHSA-rvfr-cqwq-rc4j) is a high-severity pre-authentication Denial of Service (DoS) vulnerability in the @libp2p/crypto package of the js-libp2p networking stack prior to version 5.1.22. An improper length validation flaw in the ASN.1 DER decoder allows an unauthenticated remote peer to send a crafted RSA public key during the Identify protocol exchange, forcing the parser into a synchronous loop over attacker-claimed length values. Because this loop executes within a single Node.js event-loop tick prior to identity or cryptographic signature verification, it bypasses application timeouts, stalls the event loop for 4 to 5 seconds per connection, and transiently allocates up to 2 GB of memory.

Amit Schendel
Amit Schendel
6 views•11 min read