{"id":"CVE-2026-114079","aliases":["CVE-2026-114079","GHSA-4672-hwv6-gq62"],"related":[],"kind":"vulnerability","state":"published","title":"Trigger.dev before 4.5.6 Cross-Environment Deployment Cancel via Cancel Endpoint","summary":"Trigger.dev before 4.5.6 contains an improper authorization vulnerability that allows holders of lower-trust environment API keys to cancel other environments' deployments because DeploymentService.getDeployment scopes lookups by projectId only. Attackers with a dev, preview, or CI secret key can POST to the deployment cancel endpoint to cancel in-progress production deployments within the same project.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Trigger.dev before 4.5.6 contains an improper authorization vulnerability that allows holders of lower-trust environment API keys to cancel other environments' deployments because DeploymentService.getDeployment scopes lookups by projectId only. Attackers with a dev, preview, or CI secret key can POST to the deployment cancel endpoint to cancel in-progress production deployments within the same project.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"}],"published":"2026-10-02T22:42:40.000Z","modified":"2026-10-28T16:17:05.327Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N","score":5.3,"rating":"MEDIUM"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L","score":5.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L","score":5.4,"rating":"MEDIUM"}],"cwes":["CWE-639"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"4.5.6","status":"affected"},{"type":"semver","version":"4.5.6","status":"unaffected"}],"vendor":"triggerdotdev","product":"trigger.dev","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.5.6"}],"ecosystem":"npm","package":"trigger.dev","purl":"pkg:npm/trigger.dev","source":"ghsa"}],"references":[{"url":"https://github.com/triggerdotdev/trigger.dev/security/advisories/GHSA-4672-hwv6-gq62","tags":["exploit","vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/trigger-dev-before-4.5.6-cross-environment-deployment-cancel-via-cancel-endpoint","tags":["third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/triggerdotdev/trigger.dev/pull/4316","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/triggerdotdev/trigger.dev/commit/6997aeb05e27d2db47f9eda01fdc8a17c81a1ae0","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/triggerdotdev/trigger.dev","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/triggerdotdev/trigger.dev/releases/tag/v4.5.6","tags":["web"],"sources":["ghsa"]}],"credits":["CyberKareem"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-10-28T15:31:38.457Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-114079","url":"https://www.cve.org/CVERecord?id=CVE-2026-114079","licence":"CVE Terms of Use","modified":"2026-10-28T15:31:57.770Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4672-hwv6-gq62","url":"https://github.com/advisories/GHSA-4672-hwv6-gq62","licence":"CC-BY-4.0","modified":"2026-10-21T10:57:24.966Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-114079","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-114079","licence":"Public domain","modified":"2026-10-28T16:17:05.327Z"}],"updatedAt":"2026-11-25T22:59:46.536Z","epss":{"score":0.00302,"percentile":0.24717,"date":"2026-12-01T12:00:22.000Z"}}