You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Hardcoded dep version make it hard to patch vulnerabilities #3842
$ bun audit
nanoid >=4.0.0 <5.1.16
workflow › @workflow/nitro › @workflow/builders › @workflow/core › nanoid
high: nanoid: non-secure generators can loop indefinitely with negative size - https://github.com/advisories/GHSA-28wg-ghj8-5hjv
high: nanoid: custom generators can loop indefinitely when size is zero - https://github.com/advisories/GHSA-2v37-7h3g-55p8
undici >=7.0.0 <7.29.0
workflow › @workflow/core › @workflow/world-vercel › undici
moderate: undici vulnerable to downstream response desynchronization via retry interceptor - https://github.com/advisories/GHSA-8xcm-r25x-g524
high: undici vulnerable to cross-user information disclosure and parse-time crash via degenerate private cache directives - https://github.com/advisories/GHSA-4cwx-7wf7-3272
moderate: undici vulnerable to CRLF Injection via blob-like body 'type' property - https://github.com/advisories/GHSA-m8rv-5g2x-5cg5
moderate: undici vulnerable to cross-user information disclosure via whitespace around equals in Cache-Control directives - https://github.com/advisories/GHSA-jr45-8vmc-qm54
moderate: undici vulnerable to cookie attribute injection via unsanitized domain and unparsed setCookie fields - https://github.com/advisories/GHSA-v3r7-h72x-cjcm
come with vulnerabilities that cannot be easily patched by upgrading workflow (since the version is fixed!), we need to manually add overrides to the package.json. This is not a scalable solution since we may have multiple versions of the same package and we only need to upgrade one.
Is there any plan to patch these and keep track of the potential vulnerabilities that workflow ships with?
Severity: S3. Every workflow install gets a high-severity npm audit/bun audit finding, and apps can only clear it with overrides. We don't believe Workflow's own use is exploitable: nanoid is only called with a fixed size of 21, and undici is only used for the SDK's own outbound requests. The findings are still real for anyone who has to pass an audit. Fresh installs today:
workflow@beta (5.0.0-beta.55): nanoid@5.1.6 only; undici is already 7.29.0.
Reproduction:npm init -y && npm i workflow@latest && npm audit --omit=dev reproduces the report above.
One caveat on the nanoid override: nanoid only feeds the seeded generator for default createHook() tokens, and nanoid@5.1.16 draws a different number of random bytes per id. With the override, a run that started before the change and is replayed after it gets different hook tokens and a shifted Math.random() sequence, which can cause replay divergence. That mostly matters on Local and Postgres Worlds, where in-flight runs pick up new code on restart. The undici override is safe.
Installing either PR's pre-release gives found 0 vulnerabilities. The remaining CI failures on both PRs are flaky e2e/timing jobs that fail the same way on other PRs. Whether to move to caret ranges or add an audit gate to CI is still a maintainer decision.
To see if this fix solves your issue, could you try to install the pre-release in your package.json? Just replace the workflow dep like so (4.x / latest line):
Would it be possible to allow at least patch (if not minor) versions for workflow's dependencies in general? Having the fixed versions in the package.json severely limits consumers' ability to maintain a vulnerability free security report, even when there's no realistic attack vector. Overriding all the time the version in our package.json is not a good idea since it can affect other 3rd party libraries
Activity
[core] Bump nanoid to 5.1.16 on stable (GHSA-28wg-ghj8-5hjv)
[core] Bump nanoid to 5.1.16 (GHSA-28wg-ghj8-5hjv)
pranaygp commentedon Sep 23, 2026
(AI)
Severity: S3. Every
workflowinstall gets a high-severitynpm audit/bun auditfinding, and apps can only clear it withoverrides. We don't believe Workflow's own use is exploitable: nanoid is only called with a fixed size of 21, and undici is only used for the SDK's own outbound requests. The findings are still real for anyone who has to pass an audit. Fresh installs today:workflow@latest(4.8.9):nanoid@5.1.6(GHSA-28wg-ghj8-5hjv) andundici@7.28.0(GHSA-4cwx-7wf7-3272 and 4 moderate). 16 findings in total.workflow@beta(5.0.0-beta.55):nanoid@5.1.6only; undici is already 7.29.0.Reproduction:
npm init -y && npm i workflow@latest && npm audit --omit=devreproduces the report above.One caveat on the
nanoidoverride: nanoid only feeds the seeded generator for defaultcreateHook()tokens, andnanoid@5.1.16draws a different number of random bytes per id. With the override, a run that started before the change and is replayed after it gets different hook tokens and a shiftedMath.random()sequence, which can cause replay divergence. That mostly matters on Local and Postgres Worlds, where in-flight runs pick up new code on restart. Theundicioverride is safe.Related:
^5.1.16. It has the replay problem described above.undici/zodto caret ranges, i.e. the "don't pin exactly" direction this issue asks about.mainbut was never backported to 4.x, because the backport check treated it as a routine bump.Fix PRs:
main): removes thenanoiddependency from@workflow/core. It inlines nanoid 5.1.6's exact algorithm for the seeded generator, with a golden test, so hook tokens stay identical across versions.stable/4.x): the same change, plus the undici 7.29.0 backport.Installing either PR's pre-release gives
found 0 vulnerabilities. The remaining CI failures on both PRs are flaky e2e/timing jobs that fail the same way on other PRs. Whether to move to caret ranges or add an audit gate to CI is still a maintainer decision.To see if this fix solves your issue, could you try to install the pre-release in your package.json? Just replace the
workflowdep like so (4.x /latestline):{ "dependencies": { "workflow": "https://workflow-tarballs-git-triage-workflow3842-undici-stable.labs.vercel.dev/workflow.tgz", "@workflow/ai": "https://workflow-tarballs-git-triage-workflow3842-undici-stable.labs.vercel.dev/workflow-ai.tgz", } }For the 5.0 beta line, use
https://workflow-tarballs-git-triage-workflow3842-hardcoded-dep-version.labs.vercel.dev/as the base URL instead.[core] Drop nanoid; freeze the seeded hook-token generator
octavian-mto commentedon Oct 2, 2026
Would it be possible to allow at least patch (if not minor) versions for
workflow's dependencies in general? Having the fixed versions in thepackage.jsonseverely limits consumers' ability to maintain a vulnerability free security report, even when there's no realistic attack vector. Overriding all the time the version in ourpackage.jsonis not a good idea since it can affect other 3rd party librariesoctavian-mto commentedon Oct 2, 2026
To back-up my previous comment, here's another package that now it's reported as vulnerable
[core] Fix vulnerable nanoid pin by dropping the dependency (#4335)
[core] Fix vulnerable nanoid pin on stable by dropping the dependency (…
[core] Fix vulnerable nanoid pin by dropping the dependency (#4335)