GHSA-4672-hwv6-gq62: Trigger.dev Cross-environment Deployment Cancel Vulnerability
MODERATEGHSA-4672-hwv6-gq62 is a MODERATE (CVSS 5.4) cross-environment deployment cancel vulnerability (CWE-639: Authorization Bypass Through User-Controlled Key) affecting Trigger.dev libraries in the npm ecosystem. The issue involves cross-environment deployment cancel. Remediation is available by upgrading affected packages to version 4.5.6.
GHSA-4672-hwv6-gq62 at a Glance
Security Impact
CVSS: 5.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L).
How to Fix GHSA-4672-hwv6-gq62
To remediate this vulnerability, upgrade all affected Trigger.dev dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install trigger.dev@4.5.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls trigger.dev
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-4672-hwv6-gq62, inspect your project dependencies using npm:
npm ls trigger.dev
Analyze the terminal output to locate any version of Trigger.dev in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.5.6), your application is affected.
Note: The npm ls trigger.dev command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-639: Authorization Bypass Through User-Controlled Key, where the system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data. In Trigger.dev, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-4672-hwv6-gq62 Affected Trigger.dev Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
trigger.dev
|
npm |
< 4.5.6
|
4.5.6
|
References
Frequently Asked Questions
What is GHSA-4672-hwv6-gq62?
Which Trigger.dev versions are affected?
What version fixes GHSA-4672-hwv6-gq62?
Is trigger.dev affected?
What is the CVSS score of GHSA-4672-hwv6-gq62?
What CWE is associated with GHSA-4672-hwv6-gq62?
How can I check npm dependencies for GHSA-4672-hwv6-gq62?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4672-hwv6-gq62",
"modified" : "2026-10-02T22:42:40Z",
"published" : "2026-10-02T22:42:40Z",
"aliases" : [ ],
"summary" : "Trigger.dev: Cross-environment deployment cancel",
"details" : "### Summary\n\nTrigger.dev isolates each project into multiple **environments** (`dev`, `staging`, `prod`, and per-PR `preview` branches), each with its **own secret API key** — the environment is a trust boundary (a `dev`/preview/CI key is lower-trust than a `prod` key). Most API routes enforce this by scoping resource lookups to the authenticated key's environment (`where: { friendlyId, runtimeEnvironmentId: auth.environment.id }`).\n\nThe deployment **cancel** path does not. `DeploymentService.getDeployment()` scopes the lookup by **`projectId` only** — never `environmentId` — so a secret key for *any* environment in a project can cancel a deployment belonging to *any other* environment of the same project, including **production**. The deployment **GET** route, by contrast, *is* env-scoped — so the same key that is **404'd when trying to read** a prod deployment can nonetheless **cancel** it. That asymmetry is the bug.\n\n### Affected\n\n`apps/webapp`, HEAD `5d99457` (current `main`). Affects self-hosted and cloud.\n\n### Root cause\n\n`apps/webapp/app/routes/api.v1.deployments.$deploymentId.cancel.ts` authenticates to an environment and calls `deploymentService.cancelDeployment(authenticatedEnv, deploymentId, ...)`.\n\n`apps/webapp/app/v3/services/deployment.server.ts`:\n```ts\npublic cancelDeployment(authenticatedEnv: Pick<AuthenticatedEnvironment,\"projectId\">, friendlyId, ...) {\n return this.getDeployment(authenticatedEnv.projectId, friendlyId) // projectId only\n .andThen(validateDeployment) // rejects only FINAL statuses\n .andThen(cancelDeployment); // updateMany -> status CANCELED\n}\nprivate getDeployment(projectId: string, friendlyId: string) {\n return this._prisma.workerDeployment.findFirst({\n where: { friendlyId, projectId }, // <-- NO environmentId filter\n });\n}\n```\n\n`cancelDeployment` accepts `authenticatedEnv` but its type is literally `Pick<AuthenticatedEnvironment,\"projectId\">` — it discards the environment identity. `validateDeployment` blocks only `FINAL_DEPLOYMENT_STATUSES`, so any in-progress deployment (`PENDING`/`INSTALLING`/`BUILDING`/`DEPLOYING`) is cancellable.\n\n**Contrast — the correctly env-scoped sibling** `api.v1.deployments.$deploymentId.ts` (GET):\n```ts\nconst deployment = await prisma.workerDeployment.findFirst({\n where: { friendlyId: deploymentId, environmentId: authenticatedEnv.id }, // env-scoped\n});\n```\nReads are env-scoped; the cancel mutation is not. The same `getDeployment(authenticatedEnv.projectId, …)` helper also backs the deployment *progress* methods (`deployment.server.ts:172,329`), so the projectId-only scope is a small class.\n\n### Runtime PoC (proven on the self-host stack)\n\nSeeded one project with a `prod` env (key `tr_prod_…`) and a `dev` env (key `tr_dev_…`) and one `WorkerDeployment` (`deployment_pocvictim`, status `DEPLOYING`) in the **prod** env. As the **dev** key:\n\n```\nstatus BEFORE : DEPLOYING\nGET /api/v1/deployments/deployment_pocvictim (dev key) -> 404 (env-scoped read DENIES it)\nPOST /api/v1/deployments/deployment_pocvictim/cancel (dev key) -> 204\nstatus AFTER : CANCELED (prod deploy canceled by the dev key)\nCONTROL: same cancel with a DIFFERENT project's key -> 404 (projectId scope blocks cross-project)\n```\n\nThe dev key cannot *read* the prod deployment (404) yet *cancels* it (204 → CANCELED); a different project's key is correctly 404'd — so the gap is precisely cross-environment within a project.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "trigger.dev"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.5.6"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 4.5.5"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/triggerdotdev/trigger.dev/security/advisories/GHSA-4672-hwv6-gq62"
}, {
"type" : "WEB",
"url" : "https://github.com/triggerdotdev/trigger.dev/pull/4316"
}, {
"type" : "WEB",
"url" : "https://github.com/triggerdotdev/trigger.dev/commit/6997aeb05e27d2db47f9eda01fdc8a17c81a1ae0"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/triggerdotdev/trigger.dev"
}, {
"type" : "WEB",
"url" : "https://github.com/triggerdotdev/trigger.dev/releases/tag/v4.5.6"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-639" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-10-02T22:42:40Z",
"nvd_published_at" : null
}
}