{"id":"CVE-2026-73654","aliases":["EUVD-2026-58358","GHSA-p28v-f755-9qrg"],"status":"published","title":"Trigger.dev: Prototype pollution via run metadata operations → process-wide cross-tenant DoS","description":"Trigger.dev is a platform for building and deploying fully managed AI agents and workflows. From 3.3.8 until 4.5.6, the PUT /api/v1/runs/:runId/metadata endpoint passes attacker-controlled operation.key values to new JSONHeroPath(operation.key).set(newMetadata, value) in packages/core/src/v3/runMetadata/operations.ts without rejecting dangerous constructor and prototype path segments. A caller with a normal environment API key can pollute Object.prototype in the shared webapp process, corrupting Prisma queries and Prometheus labels, breaking other tenants' worker authentication, and causing a process-wide denial of service. This issue is fixed in version 4.5.6.","severity":{"version":"3.1","score":8.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.0062,"percentile":0.50054,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-1321"],"published":"2026-08-13T19:29:05Z","modified":"2026-10-28T02:30:34Z","fixes":[{"ecosystem":"npm","package":"@trigger.dev/core","fixed_in":["4.5.6"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"@trigger.dev/core","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.3.8"},{"last_affected":"4.5.5"},{"fixed":"4.5.6"}]}]},{"source":"osv","ecosystem":"npm","package":"@trigger.dev/core","ranges":[{"type":"SEMVER","events":[{"introduced":"3.3.8"},{"fixed":"4.5.6"}]}]}],"products":[{"vendor":"triggerdotdev","product":"trigger.dev"}],"references":[{"url":"https://github.com/triggerdotdev/trigger.dev/security/advisories/GHSA-p28v-f755-9qrg","tags":["x_refsource_CONFIRM","exploit","advisory","web"]},{"url":"https://github.com/triggerdotdev/trigger.dev/pull/4316","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/triggerdotdev/trigger.dev/commit/6997aeb05e27d2db47f9eda01fdc8a17c81a1ae0","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/triggerdotdev/trigger.dev/releases/tag/v4.5.6","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/advisories/GHSA-p28v-f755-9qrg"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/73xxx/CVE-2026-73654.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-73654","tags":["advisory"]},{"url":"https://github.com/triggerdotdev/trigger.dev","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-73654","title":"Trigger.dev: Prototype pollution via run metadata operations → process-wide cross-tenant DoS","description":"Trigger.dev is a platform for building and deploying fully managed AI agents and workflows. From 3.3.8 until 4.5.6, the PUT /api/v1/runs/:runId/metadata endpoint passes attacker-controlled operation.key values to new JSONHeroPath(operation.key).set(newMetadata, value) in packages/core/src/v3/runMetadata/operations.ts without rejecting dangerous constructor and prototype path segments. A caller with a normal environment API key can pollute Object.prototype in the shared webapp process, corrupting Prisma queries and Prometheus labels, breaking other tenants' worker authentication, and causing a process-wide denial of service. This issue is fixed in version 4.5.6.","status":"published","published":"2026-08-13T19:29:05.537Z","modified":"2026-08-14T16:34:05.435Z","cvss":[{"version":"3.1","score":8.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-1321"],"updated_at":"2026-11-02T13:43:33.766176Z"}],"euvd":[{"id":"EUVD-2026-58358","description":"Trigger.dev is a platform for building and deploying fully managed AI agents and workflows. From 3.3.8 until 4.5.6, the PUT /api/v1/runs/:runId/metadata endpoint passes attacker-controlled operation.key values to new JSONHeroPath(operation.key).set(newMetadata, value) in packages/core/src/v3/runMetadata/operations.ts without rejecting dangerous constructor and prototype path segments. A caller with a normal environment API key can pollute Object.prototype in the shared webapp process, corrupting Prisma queries and Prometheus labels, breaking other tenants' worker authentication, and causing a process-wide denial of service. This issue is fixed in version 4.5.6.","status":"published","published":"2026-08-13T19:29:05Z","modified":"2026-08-14T16:34:05Z","cvss":[{"version":"3.1","score":8.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:H","level":"high"}],"updated_at":"2026-11-02T18:01:54.570698Z"}],"ghsa":[{"id":"GHSA-p28v-f755-9qrg","title":"Trigger.dev: Prototype pollution via run metadata operations → process-wide cross-tenant DoS","description":"## Summary\n\nThe run-metadata update endpoint `PUT /api/v1/runs/:runId/metadata` applies client-supplied\n\"operations\" by passing the **attacker-controlled `operation.key`** straight into\n`new JSONHeroPath(operation.key).set(newMetadata, value)`\n(`packages/core/src/v3/runMetadata/operations.ts:22-23`), with **no prototype-pollution guard**\n(`@jsonhero/path@^1.0.21` does not reject `__proto__`/`constructor`/`prototype`).\n\nA request with `key: \"$.__proto__.polluted\"` sets **`Object.prototype.polluted`** in the webapp\nprocess. Because every plain object then inherits that property, it corrupts unrelated code\n**process-wide and across tenants** — including Prisma query building and the Prometheus metrics\nclient — causing query failures, **broken authentication for other tenants' workers**, and an\n`uncaughtException` (denial of service). Only a normal, low-privilege environment API key is\nrequired (one request).\n\n## Severity\n\nA single request from any holder of a normal environment API key contaminates `Object.prototype`\nin the shared webapp process, breaking other tenants' workers (scope change) and degrading/\ncrashing the process (high availability impact). Prototype pollution is also a primitive for\nfurther gadget chains (integrity/confidentiality).\n\n## Affected versions\n\n- **Introduced** in commit `34f8bd588` (\"Add ability to update parent and root run metadata from\n  children\", PR #1563, 2025-01-08) — the `JSONHeroPath(operation.key).set()` sink is present from\n  the first commit of `operations.ts`. SDK was at `3.3.8` at that time.\n- **Still present at HEAD** (SDK `4.5.0-rc.7`); `operations.ts` unchanged since 2025-05, and\n  `@jsonhero/path` is pinned at `^1.0.21` (no proto-guard) throughout.\n- **Affected range:** `\u003e= v3.3.8` (metadata operations API) through `v4-beta` / current v4.x —\n  **fixed: 4.5.6**.\n\n## Root cause\n\n`packages/core/src/v3/runMetadata/operations.ts` — `applyMetadataOperations()` builds a path from\nthe **untrusted** `operation.key` and writes to it, for every operation type (`set`, `append`,\n`increment`, …):\n\n```ts\nconst path = new JSONHeroPath(operation.key);   // operation.key fully attacker-controlled\npath.set(newMetadata, operation.value);         // no __proto__/constructor/prototype rejection\n```\n\nThe request schema (`UpdateMetadataRequestBody`) types `key` as a plain string with no validation,\nand `@jsonhero/path@1.0.21` walks `__proto__` as an ordinary segment → the assignment lands on\n`Object.prototype`.\n\n## Proof of Concept\n\nSelf-host `ghcr.io/triggerdotdev/trigger.dev:v4-beta`. Authenticated with a **normal environment\nAPI key** (`tr_dev_…`) and any run id of that environment.\n\n```bash\ncurl -X PUT \"http://localhost:8030/api/v1/runs/run_cmqr2bsyo00013js2twwhdsfu/metadata\" \\\n  -H \"Authorization: Bearer tr_dev_\u003cenv_key\u003e\" -H \"Content-Type: application/json\" \\\n  --data '{\"operations\":[{\"type\":\"set\",\"key\":\"$.__proto__.polluted\",\"value\":\"PWNED\"}]}'\n```\n\n**Result — `Object.prototype.polluted = \"PWNED\"` process-wide.** Observed in the webapp logs:\n\n1. **The request's own query is corrupted** — `polluted:\"PWNED\"` injected into every object Prisma\n   enumerates:\n   ```\n   prisma.taskRun.updateMany({ where:{ id:\"…\", metadataVersion:2, polluted:\"PWNED\" },\n     data:{ …, metadataVersion:{ increment:1, polluted:\"PWNED\" }, polluted:\"PWNED\" }, polluted:\"PWNED\" })\n   -\u003e Unknown argument `polluted`\n   ```\n2. **Cross-tenant authentication break** — the *next* request from a different client (a worker's\n   `POST /engine/v1/dev/dequeue`) fails inside `findEnvironmentByApiKey`:\n   ```\n   prisma.runtimeEnvironment.findFirst({ where:{ apiKey:\"…\", polluted:\"PWNED\" },\n     include:{ project:true, …, polluted:\"PWNED\" } })  -\u003e PrismaClientValidationError\n   ```\n   i.e. one tenant's request **breaks authentication for other tenants' workers** → their jobs stop\n   being dequeued/processed.\n3. **Denial of service — full process crash.** The `uncaughtException` in prom-client\n   (`Error: Added label \"polluted\" is not included in initial labelset: [ 'kind' ]`) **crashes the\n   webapp process**. Demonstrated with a second tenant: Tenant B (a *different* org/env, with its\n   own API key) had a working request (`POST /engine/v1/dev/dequeue` → HTTP 400, auth OK) **before**\n   the attack; **immediately after Tenant A's single attack request, B's request returned HTTP 000\n   (no response) — the whole multi-tenant webapp was down**. Logs show the crash at 20:53:41 and the\n   process auto-restarting ~3s later (`FairQueue/ScheduleEngine started`). Repeating the attack in a\n   loop yields a **crash-loop = sustained DoS for all tenants**.\n\n*(Note: the metadata endpoint itself swallows the Prisma failure with `ignoreError:true` and still\nreturns HTTP 200 — the damage is the process-wide contamination observed in the logs, not the\nendpoint's status code.)*\n\n## Impact\n\nA low-privilege caller (one normal environment API key, one request) pollutes `Object.prototype`\nin the shared multi-tenant webapp process, causing:\n\n- **Full cross-tenant denial of service** — the resulting `uncaughtException` **crashes the webapp\n  process**, taking the service down for **all tenants** (demonstrated: a second tenant's request\n  returned HTTP 000 immediately after the attack). Repeating the request produces a **crash-loop /\n  sustained DoS**. Even without the crash, contaminated Prisma queries break other tenants' worker\n  authentication, halting job processing.\n- **A prototype-pollution primitive** usable for further gadget chains (auth/logic bypass, etc.).\n\n## Suggested remediation\n\n1. **Reject dangerous path segments** in `operation.key` before building the path — block\n   `__proto__`, `constructor`, `prototype` (and validate the `$.`-rooted JSONHero path shape).\n2. **Build metadata on a null-prototype object** (`Object.create(null)`) and/or use a\n   pollution-safe setter, so `__proto__` cannot reach `Object.prototype`.\n3. Upgrade/replace `@jsonhero/path` for a version that is prototype-pollution safe, or wrap its\n   `.set()` with a guard.","status":"published","published":"2026-08-13T20:54:11Z","modified":"2026-08-13T20:54:13Z","cvss":[{"version":"3.1","score":8.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:H","level":"high"}],"cwes":["CWE-1321"],"updated_at":"2026-11-02T14:41:01.23108Z"}],"nvd":[{"id":"CVE-2026-73654","description":"Trigger.dev is a platform for building and deploying fully managed AI agents and workflows. From 3.3.8 until 4.5.6, the PUT /api/v1/runs/:runId/metadata endpoint passes attacker-controlled operation.key values to new JSONHeroPath(operation.key).set(newMetadata, value) in packages/core/src/v3/runMetadata/operations.ts without rejecting dangerous constructor and prototype path segments. A caller with a normal environment API key can pollute Object.prototype in the shared webapp process, corrupting Prisma queries and Prometheus labels, breaking other tenants' worker authentication, and causing a process-wide denial of service. This issue is fixed in version 4.5.6.","status":"published","published":"2026-08-13T20:17:30.007Z","modified":"2026-09-18T20:09:01.757Z","cvss":[{"version":"3.1","score":8.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-1321"],"updated_at":"2026-11-02T14:12:37.557758Z"}],"osv":[{"id":"CVE-2026-73654","title":"Trigger.dev: Prototype pollution via run metadata operations → process-wide cross-tenant DoS","description":"Trigger.dev is a platform for building and deploying fully managed AI agents and workflows. From 3.3.8 until 4.5.6, the PUT /api/v1/runs/:runId/metadata endpoint passes attacker-controlled operation.key values to new JSONHeroPath(operation.key).set(newMetadata, value) in packages/core/src/v3/runMetadata/operations.ts without rejecting dangerous constructor and prototype path segments. A caller with a normal environment API key can pollute Object.prototype in the shared webapp process, corrupting Prisma queries and Prometheus labels, breaking other tenants' worker authentication, and causing a process-wide denial of service. This issue is fixed in version 4.5.6.","status":"published","published":"2026-08-13T19:29:05.537Z","modified":"2026-10-28T02:30:34.263650171Z","cvss":[{"version":"3.1","score":8.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:H","level":"high"}],"cwes":["CWE-1321"],"updated_at":"2026-11-02T15:45:16.365946Z"},{"id":"GHSA-p28v-f755-9qrg","title":"Trigger.dev: Prototype pollution via run metadata operations → process-wide cross-tenant DoS","description":"## Summary\n\nThe run-metadata update endpoint `PUT /api/v1/runs/:runId/metadata` applies client-supplied\n\"operations\" by passing the **attacker-controlled `operation.key`** straight into\n`new JSONHeroPath(operation.key).set(newMetadata, value)`\n(`packages/core/src/v3/runMetadata/operations.ts:22-23`), with **no prototype-pollution guard**\n(`@jsonhero/path@^1.0.21` does not reject `__proto__`/`constructor`/`prototype`).\n\nA request with `key: \"$.__proto__.polluted\"` sets **`Object.prototype.polluted`** in the webapp\nprocess. Because every plain object then inherits that property, it corrupts unrelated code\n**process-wide and across tenants** — including Prisma query building and the Prometheus metrics\nclient — causing query failures, **broken authentication for other tenants' workers**, and an\n`uncaughtException` (denial of service). Only a normal, low-privilege environment API key is\nrequired (one request).\n\n## Severity\n\nA single request from any holder of a normal environment API key contaminates `Object.prototype`\nin the shared webapp process, breaking other tenants' workers (scope change) and degrading/\ncrashing the process (high availability impact). Prototype pollution is also a primitive for\nfurther gadget chains (integrity/confidentiality).\n\n## Affected versions\n\n- **Introduced** in commit `34f8bd588` (\"Add ability to update parent and root run metadata from\n  children\", PR #1563, 2025-01-08) — the `JSONHeroPath(operation.key).set()` sink is present from\n  the first commit of `operations.ts`. SDK was at `3.3.8` at that time.\n- **Still present at HEAD** (SDK `4.5.0-rc.7`); `operations.ts` unchanged since 2025-05, and\n  `@jsonhero/path` is pinned at `^1.0.21` (no proto-guard) throughout.\n- **Affected range:** `\u003e= v3.3.8` (metadata operations API) through `v4-beta` / current v4.x —\n  **fixed: 4.5.6**.\n\n## Root cause\n\n`packages/core/src/v3/runMetadata/operations.ts` — `applyMetadataOperations()` builds a path from\nthe **untrusted** `operation.key` and writes to it, for every operation type (`set`, `append`,\n`increment`, …):\n\n```ts\nconst path = new JSONHeroPath(operation.key);   // operation.key fully attacker-controlled\npath.set(newMetadata, operation.value);         // no __proto__/constructor/prototype rejection\n```\n\nThe request schema (`UpdateMetadataRequestBody`) types `key` as a plain string with no validation,\nand `@jsonhero/path@1.0.21` walks `__proto__` as an ordinary segment → the assignment lands on\n`Object.prototype`.\n\n## Proof of Concept\n\nSelf-host `ghcr.io/triggerdotdev/trigger.dev:v4-beta`. Authenticated with a **normal environment\nAPI key** (`tr_dev_…`) and any run id of that environment.\n\n```bash\ncurl -X PUT \"http://localhost:8030/api/v1/runs/run_cmqr2bsyo00013js2twwhdsfu/metadata\" \\\n  -H \"Authorization: Bearer tr_dev_\u003cenv_key\u003e\" -H \"Content-Type: application/json\" \\\n  --data '{\"operations\":[{\"type\":\"set\",\"key\":\"$.__proto__.polluted\",\"value\":\"PWNED\"}]}'\n```\n\n**Result — `Object.prototype.polluted = \"PWNED\"` process-wide.** Observed in the webapp logs:\n\n1. **The request's own query is corrupted** — `polluted:\"PWNED\"` injected into every object Prisma\n   enumerates:\n   ```\n   prisma.taskRun.updateMany({ where:{ id:\"…\", metadataVersion:2, polluted:\"PWNED\" },\n     data:{ …, metadataVersion:{ increment:1, polluted:\"PWNED\" }, polluted:\"PWNED\" }, polluted:\"PWNED\" })\n   -\u003e Unknown argument `polluted`\n   ```\n2. **Cross-tenant authentication break** — the *next* request from a different client (a worker's\n   `POST /engine/v1/dev/dequeue`) fails inside `findEnvironmentByApiKey`:\n   ```\n   prisma.runtimeEnvironment.findFirst({ where:{ apiKey:\"…\", polluted:\"PWNED\" },\n     include:{ project:true, …, polluted:\"PWNED\" } })  -\u003e PrismaClientValidationError\n   ```\n   i.e. one tenant's request **breaks authentication for other tenants' workers** → their jobs stop\n   being dequeued/processed.\n3. **Denial of service — full process crash.** The `uncaughtException` in prom-client\n   (`Error: Added label \"polluted\" is not included in initial labelset: [ 'kind' ]`) **crashes the\n   webapp process**. Demonstrated with a second tenant: Tenant B (a *different* org/env, with its\n   own API key) had a working request (`POST /engine/v1/dev/dequeue` → HTTP 400, auth OK) **before**\n   the attack; **immediately after Tenant A's single attack request, B's request returned HTTP 000\n   (no response) — the whole multi-tenant webapp was down**. Logs show the crash at 20:53:41 and the\n   process auto-restarting ~3s later (`FairQueue/ScheduleEngine started`). Repeating the attack in a\n   loop yields a **crash-loop = sustained DoS for all tenants**.\n\n*(Note: the metadata endpoint itself swallows the Prisma failure with `ignoreError:true` and still\nreturns HTTP 200 — the damage is the process-wide contamination observed in the logs, not the\nendpoint's status code.)*\n\n## Impact\n\nA low-privilege caller (one normal environment API key, one request) pollutes `Object.prototype`\nin the shared multi-tenant webapp process, causing:\n\n- **Full cross-tenant denial of service** — the resulting `uncaughtException` **crashes the webapp\n  process**, taking the service down for **all tenants** (demonstrated: a second tenant's request\n  returned HTTP 000 immediately after the attack). Repeating the request produces a **crash-loop /\n  sustained DoS**. Even without the crash, contaminated Prisma queries break other tenants' worker\n  authentication, halting job processing.\n- **A prototype-pollution primitive** usable for further gadget chains (auth/logic bypass, etc.).\n\n## Suggested remediation\n\n1. **Reject dangerous path segments** in `operation.key` before building the path — block\n   `__proto__`, `constructor`, `prototype` (and validate the `$.`-rooted JSONHero path shape).\n2. **Build metadata on a null-prototype object** (`Object.create(null)`) and/or use a\n   pollution-safe setter, so `__proto__` cannot reach `Object.prototype`.\n3. Upgrade/replace `@jsonhero/path` for a version that is prototype-pollution safe, or wrap its\n   `.set()` with a guard.","status":"published","published":"2026-08-13T20:54:11Z","modified":"2026-08-13T21:11:02.927648Z","cvss":[{"version":"3.1","score":8.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:H","level":"high"}],"cwes":["CWE-1321"],"updated_at":"2026-11-02T15:46:52.534897Z"}]}}
