GHSA-P28V-F755-9QRG
Vulnerability from github – Published: 2026-08-13 20:54 – Updated: 2026-08-13 20:54Summary
The run-metadata update endpoint PUT /api/v1/runs/:runId/metadata applies client-supplied
"operations" by passing the attacker-controlled operation.key straight into
new JSONHeroPath(operation.key).set(newMetadata, value)
(packages/core/src/v3/runMetadata/operations.ts:22-23), with no prototype-pollution guard
(@jsonhero/path@^1.0.21 does not reject __proto__/constructor/prototype).
A request with key: "$.__proto__.polluted" sets Object.prototype.polluted in the webapp
process. Because every plain object then inherits that property, it corrupts unrelated code
process-wide and across tenants — including Prisma query building and the Prometheus metrics
client — causing query failures, broken authentication for other tenants' workers, and an
uncaughtException (denial of service). Only a normal, low-privilege environment API key is
required (one request).
Severity
A single request from any holder of a normal environment API key contaminates Object.prototype
in the shared webapp process, breaking other tenants' workers (scope change) and degrading/
crashing the process (high availability impact). Prototype pollution is also a primitive for
further gadget chains (integrity/confidentiality).
Affected versions
- Introduced in commit
34f8bd588("Add ability to update parent and root run metadata from children", PR #1563, 2025-01-08) — theJSONHeroPath(operation.key).set()sink is present from the first commit ofoperations.ts. SDK was at3.3.8at that time. - Still present at HEAD (SDK
4.5.0-rc.7);operations.tsunchanged since 2025-05, and@jsonhero/pathis pinned at^1.0.21(no proto-guard) throughout. - Affected range:
>= v3.3.8(metadata operations API) throughv4-beta/ current v4.x — fixed: 4.5.6.
Root cause
packages/core/src/v3/runMetadata/operations.ts — applyMetadataOperations() builds a path from
the untrusted operation.key and writes to it, for every operation type (set, append,
increment, …):
const path = new JSONHeroPath(operation.key); // operation.key fully attacker-controlled
path.set(newMetadata, operation.value); // no __proto__/constructor/prototype rejection
The request schema (UpdateMetadataRequestBody) types key as a plain string with no validation,
and @jsonhero/path@1.0.21 walks __proto__ as an ordinary segment → the assignment lands on
Object.prototype.
Proof of Concept
Self-host ghcr.io/triggerdotdev/trigger.dev:v4-beta. Authenticated with a normal environment
API key (tr_dev_…) and any run id of that environment.
curl -X PUT "http://localhost:8030/api/v1/runs/run_cmqr2bsyo00013js2twwhdsfu/metadata" \
-H "Authorization: Bearer tr_dev_<env_key>" -H "Content-Type: application/json" \
--data '{"operations":[{"type":"set","key":"$.__proto__.polluted","value":"PWNED"}]}'
Result — Object.prototype.polluted = "PWNED" process-wide. Observed in the webapp logs:
- The request's own query is corrupted —
polluted:"PWNED"injected into every object Prisma enumerates:prisma.taskRun.updateMany({ where:{ id:"…", metadataVersion:2, polluted:"PWNED" }, data:{ …, metadataVersion:{ increment:1, polluted:"PWNED" }, polluted:"PWNED" }, polluted:"PWNED" }) -> Unknown argument `polluted` - Cross-tenant authentication break — the next request from a different client (a worker's
POST /engine/v1/dev/dequeue) fails insidefindEnvironmentByApiKey:prisma.runtimeEnvironment.findFirst({ where:{ apiKey:"…", polluted:"PWNED" }, include:{ project:true, …, polluted:"PWNED" } }) -> PrismaClientValidationErrori.e. one tenant's request breaks authentication for other tenants' workers → their jobs stop being dequeued/processed. - Denial of service — full process crash. The
uncaughtExceptionin prom-client (Error: Added label "polluted" is not included in initial labelset: [ 'kind' ]) crashes the webapp process. Demonstrated with a second tenant: Tenant B (a different org/env, with its own API key) had a working request (POST /engine/v1/dev/dequeue→ HTTP 400, auth OK) before the attack; immediately after Tenant A's single attack request, B's request returned HTTP 000 (no response) — the whole multi-tenant webapp was down. Logs show the crash at 20:53:41 and the process auto-restarting ~3s later (FairQueue/ScheduleEngine started). Repeating the attack in a loop yields a crash-loop = sustained DoS for all tenants.
(Note: the metadata endpoint itself swallows the Prisma failure with ignoreError:true and still
returns HTTP 200 — the damage is the process-wide contamination observed in the logs, not the
endpoint's status code.)
Impact
A low-privilege caller (one normal environment API key, one request) pollutes Object.prototype
in the shared multi-tenant webapp process, causing:
- Full cross-tenant denial of service — the resulting
uncaughtExceptioncrashes the webapp process, taking the service down for all tenants (demonstrated: a second tenant's request returned HTTP 000 immediately after the attack). Repeating the request produces a crash-loop / sustained DoS. Even without the crash, contaminated Prisma queries break other tenants' worker authentication, halting job processing. - A prototype-pollution primitive usable for further gadget chains (auth/logic bypass, etc.).
Suggested remediation
- Reject dangerous path segments in
operation.keybefore building the path — block__proto__,constructor,prototype(and validate the$.-rooted JSONHero path shape). - Build metadata on a null-prototype object (
Object.create(null)) and/or use a pollution-safe setter, so__proto__cannot reachObject.prototype. - Upgrade/replace
@jsonhero/pathfor a version that is prototype-pollution safe, or wrap its.set()with a guard.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 4.5.5"
},
"package": {
"ecosystem": "npm",
"name": "@trigger.dev/core"
},
"ranges": [
{
"events": [
{
"introduced": "3.3.8"
},
{
"fixed": "4.5.6"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-73654"
],
"database_specific": {
"cwe_ids": [
"CWE-1321"
],
"github_reviewed": true,
"github_reviewed_at": "2026-08-13T20:54:11Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "## 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** \u2014 including Prisma query building and the Prometheus metrics\nclient \u2014 causing query failures, **broken authentication for other tenants\u0027 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\u0027 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) \u2014 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 \u2014\n **fixed: 4.5.6**.\n\n## Root cause\n\n`packages/core/src/v3/runMetadata/operations.ts` \u2014 `applyMetadataOperations()` builds a path from\nthe **untrusted** `operation.key` and writes to it, for every operation type (`set`, `append`,\n`increment`, \u2026):\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 \u2192 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_\u2026`) 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 \u0027{\"operations\":[{\"type\":\"set\",\"key\":\"$.__proto__.polluted\",\"value\":\"PWNED\"}]}\u0027\n```\n\n**Result \u2014 `Object.prototype.polluted = \"PWNED\"` process-wide.** Observed in the webapp logs:\n\n1. **The request\u0027s own query is corrupted** \u2014 `polluted:\"PWNED\"` injected into every object Prisma\n enumerates:\n ```\n prisma.taskRun.updateMany({ where:{ id:\"\u2026\", metadataVersion:2, polluted:\"PWNED\" },\n data:{ \u2026, metadataVersion:{ increment:1, polluted:\"PWNED\" }, polluted:\"PWNED\" }, polluted:\"PWNED\" })\n -\u003e Unknown argument `polluted`\n ```\n2. **Cross-tenant authentication break** \u2014 the *next* request from a different client (a worker\u0027s\n `POST /engine/v1/dev/dequeue`) fails inside `findEnvironmentByApiKey`:\n ```\n prisma.runtimeEnvironment.findFirst({ where:{ apiKey:\"\u2026\", polluted:\"PWNED\" },\n include:{ project:true, \u2026, polluted:\"PWNED\" } }) -\u003e PrismaClientValidationError\n ```\n i.e. one tenant\u0027s request **breaks authentication for other tenants\u0027 workers** \u2192 their jobs stop\n being dequeued/processed.\n3. **Denial of service \u2014 full process crash.** The `uncaughtException` in prom-client\n (`Error: Added label \"polluted\" is not included in initial labelset: [ \u0027kind\u0027 ]`) **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` \u2192 HTTP 400, auth OK) **before**\n the attack; **immediately after Tenant A\u0027s single attack request, B\u0027s request returned HTTP 000\n (no response) \u2014 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 \u2014 the damage is the process-wide contamination observed in the logs, not the\nendpoint\u0027s 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** \u2014 the resulting `uncaughtException` **crashes the webapp\n process**, taking the service down for **all tenants** (demonstrated: a second tenant\u0027s 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\u0027 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 \u2014 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.",
"id": "GHSA-p28v-f755-9qrg",
"modified": "2026-08-13T20:54:11Z",
"published": "2026-08-13T20:54:11Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/triggerdotdev/trigger.dev/security/advisories/GHSA-p28v-f755-9qrg"
},
{
"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"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:H",
"type": "CVSS_V3"
}
],
"summary": "Trigger.dev: Prototype pollution via run metadata operations \u2192 process-wide cross-tenant DoS"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.