Sanaan Fayaz Wani

triggerdotdev/trigger.dev

GHSA-59h8-w5q6-mfmp

Trigger.dev: Unauthenticated Realtime Stream Data Injection via Run FriendlyId

GHSA-59h8-w5q6-mfmp

5.3

Medium

CVSS 3.1 base

  1. 2026-05-22Reported privately
  2. 60 days later2026-07-21Published by the maintainer

What to do

If you run trigger.dev 4.5.4 and earlier, upgrade to 4.5.5 or later.

Anyone who can reach it over the network, with no account and no user interaction, can change some data.Read from the CVSS 3.1 vector

CVSS 3.1 metrics

To exploit it

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None

What it gets

Confidentiality
None
Integrity
Low
Availability
None
Scope
Unchanged

Open this vector in the FIRST calculator ↗

Weakness
CWE-306 Missing Authentication for Critical Functionality
CVE
not assigned
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Also in trigger.dev
GHSA-jc26-22qp-cgqj 7.9 · GHSA-pqxw-g93w-hj9x 8.1
2026-05-22Reported privately
60 days
2026-07-21Published by the maintainer

My analysis of this finding: root cause, the vulnerable code, the impact and the fix, in the site’s format. The official advisory of record is linked above.

Affected versions

Package Ecosystem Vulnerable Fixed in
trigger.dev npm <= 4.5.4 4.5.5

Summary

trigger.dev’s realtime streams let a running task push data (logs, AI token chunks, progress) to clients subscribed to a run. The POST ingest handler at apps/webapp/app/routes/realtime.v1.streams.$runId.$streamId.ts carries no authentication at all. Anyone who can reach the webapp and knows a run’s friendlyId can inject arbitrary bytes into that run’s realtime stream, and those bytes are delivered to every subscriber as if they came from the task itself.

Where it lives

The action handler is explicitly a plain Remix action with no auth wrapper. The comment on the function says the quiet part out loud:

// Plain action for backwards compatibility with older clients that don't send auth headersexport async function action({ request, params }: ActionFunctionArgs) {  const parsedParams = ParamsSchema.safeParse(params);  ...  const { runId, streamId } = parsedParams.data;   // Look up the run without environment scoping for backwards compatibility  const run = await $replica.taskRun.findFirst({    where: {      friendlyId: runId,    },    ...  });

The bugplain action with no authentication wrapperThe buglooks up the run by id with no environment scoping

Compare this with the GET loader in the same file, which is built through createLoaderApiRoute with allowJWT, a findResource that scopes on runtimeEnvironmentId: auth.environment.id, and an authorization block. The read path is authenticated and tenant scoped. The write path is not. The lookup deliberately drops environment scoping, so the only thing standing between an attacker and a stream is knowledge of the friendlyId. The handler then feeds the raw request body straight into the stream:

return realtimeStream.ingestData(  request.body,  run.friendlyId,  streamId,  clientId,  resumeFromChunkNumber);

The bugraw request body goes straight into the stream

The friendlyId is not a secret. It is a run_ prefix plus a nanoid (packages/core/src/v3/isomorphic/friendlyId.ts), and it surfaces in dashboard URLs, API responses, SSE payloads and logs. It behaves as a bearer identifier, not a credential, so any party that has ever seen the ID can write to the stream.

Impact

Stream poisoning and spoofing. An unauthenticated attacker who learns a run’s friendlyId POSTs crafted chunks into /realtime/v1/streams/:runId/:streamId. Subscribers, including dashboard viewers and @trigger.dev/react-hooks clients, receive the injected content as legitimate task output. For AI workloads that stream model tokens to end users, this lets an attacker rewrite what the user sees mid run, forge completion data, or splice misleading or malicious content into the response.

Cross environment reach. Because the lookup drops environment scoping, the injection is not confined to the attacker’s own tenant. Any run whose ID is known can be targeted.

Fix

Remove the unauthenticated action and require the same authentication the GET loader already uses. Route the write path through an authenticated API builder, scope the taskRun lookup on the caller’s runtimeEnvironmentId, and verify the caller owns the run before ingestData is reached. If older clients genuinely cannot send auth headers, gate that compatibility behind an explicit opt in rather than leaving an open write endpoint for every run in the system.

References

The record

Weakness
CWE-306 Missing Authentication for Critical Functionality
Affected
trigger.dev 4.5.4 and earlier
Fixed in
4.5.5
Disclosure
2026-05-22 Reported privately
60 days later2026-07-21 Published
Advisory
GHSA-59h8-w5q6-mfmp
Also in trigger.dev
GHSA-jc26-22qp-cgqj 7.9
GHSA-pqxw-g93w-hj9x 8.1

About this writeup

Sanaan Fayaz Wani (GitHub sfwani) reported this vulnerability to the trigger.dev maintainers under coordinated disclosure and is credited as a reporter in GHSA-59h8-w5q6-mfmp, published 2026-07-21.

All published findings: advisory index.