Trigger.dev SSRF via Unvalidated Webhook Delivery URLs
An authenticated user can configure malicious webhook endpoints in Trigger.dev (< 4.5.2) to perform server-side request forgery (SSRF) against internal services and cloud metadata endpoints.
What's new
- 1. added detection rule: Detect Potential Unauthorized Task Replay Attempt Oct 2, 22:50 via ghsa
- 2. added coverage for trigger.dev (<= 4.5.5) Oct 2, 22:50 via ghsa
- 3. added detection rule: Detect Suspicious TSQL Window-Function Injection Oct 2, 22:50 via ghsa
- 4. added detection rule: Detect Cross-Tenant Replay Attempt in Trigger.dev Oct 2, 20:23 via ghsa
Trigger.dev versions prior to 4.5.2 contain a critical server-side request forgery (SSRF) vulnerability. The application allows authenticated organization members to configure webhook alert channels with arbitrary delivery URLs. These URLs are stored as unvalidated strings and are subsequently fetched by the Trigger.dev control plane to deliver alerts using POST requests.
The application lacks any validation mechanism - such as host blocklists for private IP ranges, loopback addresses (127.0.0.1), or link-local addresses (e.g., 169.254.169.254) - at the time of creation or during the alert delivery process. An attacker with low-privilege organization access can supply an internal-only URL, causing the server to proxy signed POST requests to internal services or cloud IMDS endpoints. Because the requests include valid HMAC signatures computed by the platform, they may bypass internal authentication logic that relies on these signatures, resulting in potential unauthorized command execution or data exfiltration from internal APIs.
Attack Chain
- Attacker authenticates to a Trigger.dev instance using a valid user account.
- Attacker invokes the project API endpoint
/api/v1/projects/<projectRef>/alertChannels. - Attacker submits a POST request containing a malicious
channelDatapayload where theurlpoints to an internal resource (e.g.,http://169.254.169.254/latest/meta-data/). - The application saves the malicious URL to the
ProjectAlertmodel without validating the hostname or IP range. - Attacker triggers a task run failure event within their controlled environment.
- The
deliverAlertservice fetches the stored webhook URL, triggering a server-side request to the target internal IP. - The target internal service receives the signed POST request, potentially treating it as a legitimate system-originated event.
Impact
Successful exploitation allows an attacker to interact with services reachable from the Trigger.dev control plane, including internal management APIs, cloud instance metadata services (IMDS), and other local network resources. This can result in credential theft, internal data exposure, or the unauthorized manipulation of internal service configurations that rely on the HMAC headers provided by the Trigger.dev platform.
Recommendation
- Upgrade Trigger.dev to version 4.5.2 or later immediately to incorporate input validation for webhook URLs.
- Implement an egress filtering or proxy layer on the network hosting the Trigger.dev control plane to block outbound traffic to private (RFC 1918), loopback, and link-local address spaces.
- Audit application logs for suspicious webhook alert channel creation events targeting non-public IP addresses.
Immediate actions
Upgrade trigger.dev to 4.5.2 or later.
Mitigations
Restrict outbound network access from the Trigger.dev server to internal IP ranges via firewall or egress proxy.
SSRF primitive targeting internal network
Detection coverage 3
Detect Cross-Tenant Replay Attempt in Trigger.dev
highDetects HTTP POST requests to the replay endpoint where the environment parameter is manually specified, potentially indicating an attempt to target an unauthorized tenant.
Detect Suspicious TSQL Window-Function Injection
highDetects potential TSQL injection attempts via the /api/v1/query endpoint where window function names contain suspicious SQL subquery patterns.
Detect Potential Unauthorized Task Replay Attempt
highDetects unauthorized POST requests to task replay endpoints which lack proper session-to-resource mapping validation
Detection queries are available on the platform. Get full rules →