Wysoka

Trigger.dev: Missing Authentication in Run Replay Action Allows Cross-Organization Task Execution (IDOR)

  • Ujawniono: 02.10.2026
  • Aktualizacja: 11.10.2026 10:22

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:

ts
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:

ts
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

Czego dotyczy

Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.

PlatformaPaczkaPodatne wersjePoprawka w wersji
Paczka npm trigger.dev < 4.5.2 4.5.2

Odnośniki

Ocena CVSS 7.1/10
Wektor CVSS
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N
Słabość (CWE)
CWE-862
Platforma
npm
Paczka
trigger.dev
Ujawniono
02.10.2026
Aktualizacja
11.10.2026 10:22

Źródła i licencje

OSV / GitHub Advisory Database - GHSA-pp95-gc86-jq6q - CC BY 4.0

Historia podatności: trigger.dev

Wszystkie opisane podatności tej paczki (Paczka npm), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.

Wszystkie (10) w archiwum
Wszystkich wpisów
10
Pierwsza → ostatnia
10.2026 10.2026
Bez poprawki
0
Wykorzystywana w atakach
0

Rozkład istotności

  • Krytyczna 1
  • Wysoka 5
  • Średnia 4

Ujawnienia w latach

  1. 2026: 10
Istotność:
  1. Krytyczna ghsa-gg6r-gp4c-89hp < 4.5.4 4.5.4
  2. Trigger.dev: Missing Authentication in Run Replay Action Allows Cross-Organization Task Execution (IDOR) ten wpis
    Wysoka · 7.1 ghsa-pp95-gc86-jq6q < 4.5.2 4.5.2

Dowiedz się, które podatności dotyczą Twojej aplikacji

Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.

Podłącz swoją aplikację
Newsletter DockRay

Bezpieczeństwo aplikacji w Twojej skrzynce

Najważniejsze podatności, konkretne zalecenia i praktyczne wskazówki dla Twoich aplikacji. Wybierz technologie i śledź to, co ma znaczenie dla Twojego projektu.

  • Codzienne zestawienie nowych podatności, także krytycznych.
  • Powiadomienia o ważnych aktualizacjach.
  • Praktyczne porady o bezpieczeństwie i monitoringu aplikacji.

Pozostaw puste, aby otrzymywać informacje o wszystkich technologiach.

Zapis jest bezpłatny. Wypiszesz się jednym kliknięciem w wiadomości.