Trigger.dev: Unauthenticated Realtime Stream Data Injection via Run FriendlyIdGHSA-59h8-w5q6-mfmp
MEDIUMFix: triggerdotdev/trigger.dev#4250GHSA-59h8-w5q6-mfmp is a medium-severity (CVSS 5.3) vulnerability in trigger.dev. A fix is available for trigger.dev — see the affected versions and patch details below.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
trigger.devnpmDescription
Summary
The POST handler for /realtime/v1/streams/:runId/:streamId has no authentication. Any entity that knows or guesses a run friendlyId can inject arbitrary data into its realtime stream.
Vulnerability Details
File: apps/webapp/app/routes/realtime.v1.streams.$runId.$streamId.ts
The action handler (line 17) has no auth wrapper. The code comment says: "Plain action for backwards compatibility with older clients that don't send auth headers."
The run lookup at line 29 uses where: { friendlyId: runId } with NO environment scoping (runtimeEnvironmentId is not checked), so production runs are accessible.
Run friendlyIds follow predictable patterns (e.g., run_1234abcd).
Steps to Reproduce
# No authentication required
curl -X POST "http://localhost:8030/realtime/v1/streams/run_KNOWN_ID/stream_1" -H "Content-Type: application/json" -d '{"injected": "data"}'
Impact
Unauthenticated data injection into any run realtime stream. Cross-environment access (no scoping).
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | trigger.dev | all versions | 4.5.5npm install trigger.dev@4.5.5 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for trigger.dev, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update trigger.dev to 4.5.5 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-59h8-w5q6-mfmp is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is GHSA-59h8-w5q6-mfmp in your dependencies?
Find it across npm, including transitive dependencies.