Packages / workflow / Security
Vercel Workflow Allows Webhook Creation with Predictable User-Specified Tokens
Affected releases · workflow
- 2.x and older0.0.0 – 2.0.6No fix, no longer updated
2.x has no fix yet; the newest fixed line:
npm install workflow@4.2.0-beta.64Not affected
5.0.0 – 5.2.3
7 releases, latest
Affected
2.0.0 – 2.0.6
7 releases
Affected
1.0.0 – 1.1.6
9 releases
Affected
0.0.0 – 0.0.2
3 releases
Is your project affected?
Paste your package.json, or type the range you declare for workflow. It is read in your browser and sent nowhere.
What happens
createWebhook() in Vercel Workflow DevKit accepts a user-specified token parameter that serves as the credential for the public webhook endpoint /.well-known/workflow/v1/webhook/{token}. Official documentation recommended predictable token patterns, making it possible for an unauthenticated remote attacker to guess the token and inject arbitrary payloads into the workflow execution context.
Impact
An attacker who guesses a webhook token can resume the associated workflow with an attacker-controlled HTTP request body, potentially triggering downstream side effects such as API calls, database writes, or deployments.
Fix
Upgrade to version 4.2.0-beta.64. The fix removes the
tokenoption fromcreateWebhook()so that webhook tokens are always randomly generated by the SDK.Runs created with versions prior to 4.2.0-beta.64, that are 1) still active (i.e. running), and 2) have open hooks, are still susceptible to this vulnerability. If users suspect the hook tokens are predictable or leaked - consider cancelling those runs and restarting them on the latest patch.
Workarounds
In case a version upgrade is not possible, avoid passing predictable or guessable values to the token parameter of createWebhook(). Instead, users can either
switch from
createWebhook()tocreateHook()instead and programmatically resume hooks usingresumeHook()instead of the public webhook endpoint, oruse
createWebhook()without passing a user-providedtoken, which uses a non-guessable randomnanoidby default.