…GHSA-2v37-7h3g-55p8` cp-13.43.0 (#45362)
## **Description**
`nanoid` is a direct production dependency and `main` resolved it to
3.3.16.
[GHSA-2v37-7h3g-55p8](GHSA-2v37-7h3g-55p8)
covers `< 3.3.17` — a custom generator built with `customAlphabet` /
`customRandom` loops indefinitely when `size` is zero.
This moves the declared range to `^3.3.17` and consolidates every 3.x
descriptor in the tree onto a single 3.3.17 entry:
```
"nanoid@npm:^3.3.10, ^3.3.11, ^3.3.16, ^3.3.17, ^3.3.8":
version: 3.3.17
```
Two notes for anyone repeating this, because the obvious commands both
fail in different directions:
- **`yarn dedupe` alone does not reach it.** Dedupe consolidates onto
the highest version *already in the lockfile*, so with 3.3.16 resolved
it is a no-op — the version has to be introduced with `yarn up` first.
- **A bare `yarn up nanoid` overshoots.** nanoid's `latest` dist-tag is
`6.0.1`, so it rewrites the range to `^6.0.1` and pulls a major; the 3.x
line ships under the `legacy` tag. Pinning to `@^3.3.17` keeps it in
range.
The remaining `nanoid@2.1.11` is untouched and unaffected — dev-only,
reached through `redux-devtools-core`.
## **Changelog**
CHANGELOG entry: null
## **Related issues**
Fixes: #45334
Reachability triage for this advisory, including why the upgrade path
here is clean unlike #45325's:
#45334 (comment)
## **Manual testing steps**
Dependency-only change with no runtime surface, so verification is by
resolution and audit rather than by using the app.
1. `yarn install`
2. `grep -A2 '^"nanoid@npm' yarn.lock` → every `^3.3.x` descriptor
resolves to a single `3.3.17` entry
3. `yarn npm audit --recursive --environment production` → nanoid no
longer reported
### Results on this branch
| check | result |
|---|---|
| declared range | `dependencies.nanoid` = `^3.3.17` |
| resolution | all five 3.x descriptors consolidated onto **3.3.17** |
| production audit | nanoid **not flagged** |
| diff scope | `package.json` 1 line, `yarn.lock` 10 lines |
## **Screenshots/Recordings**
N/A — no user-visible change.
## **Pre-merge author checklist**
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable — N/A, dependency bump
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable — N/A
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **Pre-merge reviewer checklist**
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Patch-level dependency bump with lockfile consolidation only; no
source changes and stays on nanoid 3.x.
>
> **Overview**
> Bumps the direct production dependency **`nanoid`** from `^3.3.8` to
**`^3.3.17`** and refreshes **`yarn.lock`** so every `^3.3.x` descriptor
resolves to a single **3.3.17** entry (replacing **3.3.16**).
>
> This addresses
[GHSA-2v37-7h3g-55p8](GHSA-2v37-7h3g-55p8),
where `customAlphabet` / `customRandom` can loop indefinitely when
`size` is zero on versions below 3.3.17. There are **no application or
runtime code changes**—only dependency resolution.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
3e63d80. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
^3.3.17to clearGHSA-2v37-7h3g-55p8cp-13.43.0 (chore: bump nanoid to^3.3.17to clearGHSA-2v37-7h3g-55p8cp-13.43.0 #45362)Description
nanoidis a direct production dependency andmainresolved it to3.3.16.
GHSA-2v37-7h3g-55p8
covers
< 3.3.17— a custom generator built withcustomAlphabet/customRandomloops indefinitely whensizeis zero.This moves the declared range to
^3.3.17and consolidates every 3.xdescriptor in the tree onto a single 3.3.17 entry:
Two notes for anyone repeating this, because the obvious commands both
fail in different directions:
yarn dedupealone does not reach it. Dedupe consolidates ontothe highest version already in the lockfile, so with 3.3.16 resolved
it is a no-op — the version has to be introduced with
yarn upfirst.yarn up nanoidovershoots. nanoid'slatestdist-tag is6.0.1, so it rewrites the range to^6.0.1and pulls a major; the 3.xline ships under the
legacytag. Pinning to@^3.3.17keeps it inrange.
The remaining
nanoid@2.1.11is untouched and unaffected — dev-only,reached through
redux-devtools-core.Changelog
CHANGELOG entry: null
Related issues
Fixes: #45334
Reachability triage for this advisory, including why the upgrade path
here is clean unlike #45325's:
#45334 (comment)
Manual testing steps
Dependency-only change with no runtime surface, so verification is by
resolution and audit rather than by using the app.
yarn installgrep -A2 '^"nanoid@npm' yarn.lock→ every^3.3.xdescriptorresolves to a single
3.3.17entryyarn npm audit --recursive --environment production→ nanoid nolonger reported
Results on this branch
dependencies.nanoid=^3.3.17package.json1 line,yarn.lock10 linesScreenshots/Recordings
N/A — no user-visible change.
Pre-merge author checklist
Docs and MetaMask
Extension Coding
Standards.
if applicable — N/A
guidelines).
Not required for external contributors.
Pre-merge reviewer checklist
app, test code being changed).
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
Note
Low Risk
Patch-level dependency bump with lockfile consolidation only; no
source changes and stays on nanoid 3.x.
Overview
Bumps the direct production dependency
nanoidfrom^3.3.8to^3.3.17and refreshesyarn.lockso every^3.3.xdescriptorresolves to a single 3.3.17 entry (replacing 3.3.16).
This addresses
GHSA-2v37-7h3g-55p8,
where
customAlphabet/customRandomcan loop indefinitely whensizeis zero on versions below 3.3.17. There are no application orruntime code changes—only dependency resolution.
Reviewed by Cursor Bugbot for commit
3e63d80. Bugbot is set up for automated
code reviews on this repo. Configure
here.