fix: bump nanoid to 3.3.18 to resolve GHSA-2v37-7h3g-55p8 (DEVX-8510) - #32
Draft
warp-agent-staging[bot] wants to merge 1 commit into
Draft
fix: bump nanoid to 3.3.18 to resolve GHSA-2v37-7h3g-55p8 (DEVX-8510)#32warp-agent-staging[bot] wants to merge 1 commit into
warp-agent-staging[bot] wants to merge 1 commit into
Conversation
nanoid is a transitive dependency (required by postcss as ^3.3.16), but package.json pinned it to the vulnerable 3.3.17 via an explicit npm `overrides` entry. That pin, not postcss's range, is what held the resolved tree at 3.3.17, so `npm update`/`npm audit fix` alone could not move it. Bump the overrides.nanoid pin to 3.3.18 (first patched version on the 3.x line) and regenerate the package-lock.json entry for nanoid via npm. This stays on the 3.x line rather than migrating to nanoid 5.1.6+, and nanoid remains override-only (not added to dependencies). Fixes DEVX-8510 / GHSA-2v37-7h3g-55p8. Co-Authored-By: Warp <agent@warp.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bumps the transitive
nanoiddependency from3.3.17to3.3.18to resolve GHSA-2v37-7h3g-55p8 (DEVX-8510), a high-severity DoS via infinite loop incustomAlphabet/customRandomwhen called withsize: 0.nanoidis not a direct dependency here — it's required bypostcssas^3.3.16. However,package.jsonhad an explicit npmoverridesentry pinningnanoidto the vulnerable3.3.17. That pin, not postcss's range, is what held the resolved tree at3.3.17, so a plainnpm update nanoid/npm audit fixcould not move it without changingpackage.json.The advisory has two affected ranges/patched versions:
< 3.3.18(patched at3.3.18) and>= 4.0.0, < 5.1.6(patched at5.1.6). Since this repo is on the 3.x line via postcss,3.3.18is the correct, minimal patch — there is no need to jump to5.1.6+, which would be a bigger migration for no additional benefit here.Changes
package.json: bump theoverrides.nanoidpin from3.3.17to3.3.18(exact pin, matching the style of the other entries in thisoverridesblock).package-lock.json: regenerated the singlenode_modules/nanoidentry (version,resolved,integrity) to3.3.18via npm, using npm's own computed values (no hand-written hashes).nanoidremains transitive/override-only; it was not added todependenciesordevDependencies, and no other packages were touched.Verification
git diff— confirmed the diff touches only thenanoidoverride line inpackage.jsonand the singlenanoidentry inpackage-lock.json.npm ci— succeeds cleanly with the regenerated lockfile.npm ls nanoid— resolves tonanoid@3.3.18 overridden(previously3.3.17).npm audit— the nanoid/GHSA-2v37-7h3g-55p8 finding is gone. Two unrelated pre-existing advisories remain (@hono/node-serverpath traversal,fast-urihost confusion) — out of scope for this change.npm run lint— passes (0 errors; 6 pre-existing warnings unrelated to this change).npx prisma generate && npx next build— production build succeeds.testsdirectory was reviewed but exercising it needs those secrets.Co-Authored-By: Warp agent@warp.dev