Skip to content

Memory exhaustion can terminate a webapp process through unauthenticated chunked multipart request to /auth/sso

This report was submitted with AI assistance

Moderate
carderne published GHSA-77m6-88q3-q7v3 Nov 18, 2026

Package

trigger.dev webapp

Affected versions

<=4.8.5

Patched versions

>=4.8.6

Description

Summary

An unauthenticated client can send a large chunked multipart/form-data request to POST /auth/sso, causing the webapp to buffer the request in memory before any rate limit is applied. The route is not covered by the streaming request body cap that Trigger.dev already applies to other body-consuming endpoints.

In a local component reproduction using the Node image and Remix/Express versions from current upstream, one 192 MiB request caused a 384 MiB webapp container to exit with code 137 and OOMKilled:true. This demonstrates termination of one memory-constrained webapp process or container.

Details

Affected revision and component

I confirmed the issue on commit c515c3f74656fe79e311acb1d32fe8f091f18a8d, which reports Trigger.dev version 4.8.4.

Affected component is the Remix webapp action for POST /auth/sso.

Root cause

The SSO action accepts both URL-encoded and multipart form bodies, then calls request.formData() before checking either its IP-based or email-based rate limit:

apps/webapp/app/routes/auth.sso.ts:26-54

const contentType = request.headers.get("content-type")?.toLowerCase() ?? "";
if (
  !contentType.includes("application/x-www-form-urlencoded") &&
  !contentType.includes("multipart/form-data")
) {
  return new Response(null, { status: 415 });
}

const form = await request.formData();

// The IP and email rate limits begin later.
if (env.LOGIN_RATE_LIMITS_ENABLED) {
  // ...
}

Trigger.dev already has middleware that counts request bytes while they arrive and returns 413 when a configured route exceeds its limit:

apps/webapp/app/services/ingressBodyCap.server.ts:9-88

That middleware runs before the Remix request handler:

apps/webapp/server.ts:287-295

However, its current policy includes only dashboard-agent and OTLP routes. /auth/sso is not included:

apps/webapp/app/entry.server.tsx:384-388

export const ingressBodyCap = createIngressBodyCap([
  DASHBOARD_AGENT_INGRESS_CAP,
  otlpIngressCap(env.OTLP_INGRESS_BODY_SIZE_LIMIT_MB * 1024 * 1024),
]);

There is no global Express body parser or request body ceiling before Remix. A Content-Length check alone would not close the path because HTTP/1.1 chunked requests can omit that header. The proof of concept below does so.

Expected behavior: An oversized unauthenticated request is rejected with 413 while it streams, before Remix buffers or parses the form.

Actual behavior: The request is buffered without an application-level limit. Under the tested memory limit, the process is killed before form parsing completes or the SSO rate limiter runs.

Evidence and limits

The reproduction uses the real createRemixRequest implementation from @remix-run/express@2.17.5, followed by the same request.formData() call used by the affected route. It runs in the exact Node image digest pinned by current upstream and uses the same Remix and Express versions as apps/webapp/package.json.

This is an isolated HTTP component proof and it establishes the parsing behavior + termination of one memory-constrained process or container. It doesn't confirm Trigger.dev Cloud's container memory limit, replica count, restart behavior, autoscaling behavior, request timeouts or AWS WAF configuration. I sent no oversized request to Trigger.dev Cloud and accessed no customer data.

Suggested remediation

Add an /auth/sso policy to the existing ingressBodyCap list so the request is counted and refused before Remix parses it. A small route-specific ceiling should be sufficient because the form contains short values such as email, redirectTo, and flow.

If the SSO form never requires file uploads, rejecting multipart/form-data and accepting only application/x-www-form-urlencoded would reduce the exposed parser surface. I would still keep a streaming byte cap because chunked URL-encoded bodies can also omit Content-Length.

A regression test should send an over-limit chunked request without Content-Length, confirm a 413 response, and confirm the Remix action is never entered.

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

CVE ID

No known CVE

Weaknesses

Memory Allocation with Excessive Size Value

The product allocates memory based on an untrusted, large size value, but it does not ensure that the size is within expected limits, allowing arbitrary amounts of memory to be allocated. Learn more on MITRE.

Credits