Skip to content

[agent] chore(deps): override nanoid to ^3.3.11 to fix CVE-2021-23566#728

Draft
github-actions[bot] wants to merge 1 commit intomainfrom
fix/dependabot-nanoid-cve-2021-23566-666b5e18a69f9f1b
Draft

[agent] chore(deps): override nanoid to ^3.3.11 to fix CVE-2021-23566#728
github-actions[bot] wants to merge 1 commit intomainfrom
fix/dependabot-nanoid-cve-2021-23566-666b5e18a69f9f1b

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 5, 2026

Summary

Fixes Dependabot alert #1GHSA-qrpm-p2h7-hrv2 / CVE-2021-23566 (medium, CVSS 5.5).

Vulnerability: nanoid >= 3.0.0, < 3.1.31 leaks the previously generated ID via valueOf(), exposing sensitive information to unauthorized actors (CWE-200).

Changes

  • Added "overrides": { "nanoid": "^3.3.11" } to the root package.json
  • Updated package-lock.json: nanoid bumped from 3.1.203.3.12 (safe); the postcss-specific nested nanoid@3.3.11 entry was deduplicated into the single hoisted 3.3.12 entry

Why overrides (not a direct manifest bump)

The vulnerable nanoid@3.1.20 is introduced transitively by mocha@8.4.0, which pins it exactly. mocha@8.4.0 is the last 8.x release — there is no 8.x mocha that ships a patched nanoid.

Upgrading to mocha@9.x / 10.x (which ship nanoid ≥ 3.2.0) is a major-version bump that would require editing 27 workspace package.json files and validating the full test suite — a large, risky change for a medium-severity dev-only advisory.

nanoid@3.3.12 is fully API-compatible with mocha 8's usage of the 3.x series (postcss in this repo was already using 3.3.11 without issues).

Alert reference

Generated by Dependabot remediation agent · ● 1.9M ·

Add npm overrides to force nanoid >= 3.3.11 across the dependency tree,
resolving GHSA-qrpm-p2h7-hrv2 / CVE-2021-23566 (medium, score 5.5).

The vulnerable nanoid 3.1.20 was transitively introduced by mocha@8.4.0
which pins it exactly. Since mocha 8.x is the latest 8.x release and
upgrading to mocha 9.x/10.x would require touching 27 workspace
package.json files with a major-version bump, an npm overrides entry
in the root package.json is used as the fallback to pin nanoid to
API-compatible with mocha's usage of the 3.x series.

Closes Dependabot alert #1.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants