# GHSA-pp95-gc86-jq6q: Trigger.dev: Missing Authentication in Run Replay Action Allows Cross-Organization Task Execution (IDOR)

> An authenticated user can execute tasks in other organizations by exploiting missing authorization checks in the run replay action.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 2 Oct 2026

## What is GHSA-pp95-gc86-jq6q?

GHSA-pp95-gc86-jq6q is a missing authorization vulnerability in trigger.dev, published on 2 Oct 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

### Summary

The run replay `action` function at `apps/webapp/app/routes/resources.taskruns.$runParam.replay.ts` has no authentication or authorization check. While the `loader` (GET) in the same file properly calls `requireUser(request)` and scopes queries to the user's organizations, the `action` (POST) at line 166 does neither — allowing any authenticated user to replay task runs from any organization by knowing the run's `friendlyId`.

### Details

**Vulnerable file:** `apps/webapp/app/routes/resources.taskruns.$runParam.replay.ts`

**The `loader` (line 28-29) — properly authenticated:**
```typescript
export async function loader({ request, params }: LoaderFunctionArgs) {
  const user = await requireUser(request);  // ✓ Auth check
  const userId = user.id;
  // ... queries scoped to user's orgs
}
```

**The `action` (line 166-193) — NO authentication:**
```typescript
export const action: ActionFunction = async ({ request, params }) => {
  const { runParam } = ParamSchema.parse(params);
  // ✗ NO requireUser() call
  // ✗ NO requireUserId() call
  // ✗ NO org membership check

  const taskRun = await prisma.taskRun.findFirst({
    where: {
      friendlyId: runParam,  // Queries ANY run, no org scoping
    },
    include: {
      runtimeEnvironment: { select: { slug: true } },
      project: { include: { organization: true } },
    },
  });

  // ... proceeds to replay the run in the victim's environment
  const replayRunService = new ReplayTaskRunService();
```

The Prisma query at line 177 fetches the run by `friendlyId` only — no `userId` or organization filter. The `ReplayTaskRunService` then creates a new task run in the victim's environment, executing with the victim's environment variables and secrets.

**Same bug class exists in:** `apps/webapp/app/routes/resources.batches.$batchId.check-completion.ts` (line 17) — the `action` has zero authentication, allowing any user to trigger batch completion for any batch ID.

### PoC

**Run replay IDOR:**
```bash
# Any authenticated user can replay any org's task run
POST /resources/taskruns/run_abc123def/replay
Cookie: <any-valid-session>
Content-Type: application/x-www-form-urlencoded

environmentId=<victim-env-id>&failedRedirect=/
```

The `friendlyId` values (e.g., `run_abc123def`) are short, incrementing strings that can be enumerated.

**Batch completion (same bug class):**
```bash
# Any authenticated user can trigger batch completion for any batch
POST /resources/batches/<batchId>/check-completion
Cookie: <any-valid-session>
Content-Type: application/x-www-form-urlencoded

redirectUrl=/
```

### Impact

- **Cross-organization task execution:** An attacker can replay task runs belonging to other organizations, executing tasks in the victim's environment with the victim's secrets and API keys
- **Secret exposure:** Replayed tasks run with the victim organization's environment variables, which may contain database credentials, API keys, and other secrets
- **Resource consumption:** Attacker consumes the victim's compute quota by replaying their tasks
- **Data integrity:** The batch completion endpoint can prematurely resume parent tasks waiting for batch results, causing data integrity issues
- **Low attack complexity:** `friendlyId` values are short, predictable strings — enumeration is feasible

## Which versions are affected by GHSA-pp95-gc86-jq6q?

2 open source packages ship an affected version, including trigger.dev.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `trigger.dev` | npm | All versions | 4.5.2 |
| `trigger.dev` | npm | All versions | 4.5.2 |

## How do I fix GHSA-pp95-gc86-jq6q?

Upgrade trigger.dev to 4.5.2 or later.

## Is GHSA-pp95-gc86-jq6q being exploited?

There is no known exploitation of GHSA-pp95-gc86-jq6q in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-pp95-gc86-jq6q and fix it if it is affected.

What it is: GHSA-pp95-gc86-jq6q is a missing authorization vulnerability in trigger.dev, published on 2 Oct 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-pp95-gc86-jq6q in the wild and no public exploit code.

Affected packages and fixed versions:
- trigger.dev (npm): affected all versions; fixed in 4.5.2
- trigger.dev (npm): affected all versions; fixed in 4.5.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-pp95-gc86-jq6q/ (Markdown: https://insights.sbomify.com/GHSA-pp95-gc86-jq6q/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-pp95-gc86-jq6q

---
From sbomify Insights: https://insights.sbomify.com/GHSA-pp95-gc86-jq6q/
Summaries are generated and may contain mistakes; the official description above is the record.
