Skip to content

High-severity nanoid advisory in the production tree (via vite → postcss), on both branches #2058

Closed

Description

@cliffhall

npm audit --omit=dev at the repo root reports one high severity vulnerability in the production tree, on both main and v2/main (identical version, so it is not drift — see #2057, which is about parity and deliberately leaves this alone):

nanoid  3.3.16   severity=high   vulnerable: <3.3.18   fixAvailable: true
GHSA-2v37-7h3g-55p8 — custom generators can loop indefinitely when size is zero

It is transitive, three levels down:

@modelcontextprotocol/inspector
└─┬ vite@8.2.0
  └─┬ postcss@8.5.25
    └── nanoid@3.3.16

Dependabot has not raised it — plausibly because the advisory is only reachable through a postcss range that its security updates consider already satisfied, or because it is grouped with updates it has open elsewhere. Worth confirming rather than assuming.

Notes

  • npm audit fix reports a fix is available, so this is likely a lockfile-only bump of nanoid (or of postcss), not a vite major.
  • Reachability is probably nil in practice — the affected path needs a custom generator called with size: 0, and nothing here calls nanoid directly; it arrives through PostCSS's source-map machinery. That argues for treating this as hygiene rather than an incident, but the audit output is a standing red mark on the release branch either way, and a clean npm audit is worth having so a real finding is not lost in noise.
  • Note vite is declared in root dependencies, not devDependencies, which is why this shows under --omit=dev at all. Whether that placement is correct is a separate question worth a look while here — per the placement rule in AGENTS.md, a package only the build tooling needs belongs in devDependencies.

Scope

Bump the transitive dependency to a non-vulnerable version, confirm npm audit --omit=dev is clean at the root and in each client install, and run npm run ci.

Activity

  1. added this to the v2.3.0 milestone on Aug 19, 2026
  2. added
    v2Issues and PRs for v2
    choreMaintenance: deps, build tooling, CI, cleanup — no user-facing behavior change
    on Aug 19, 2026
  3. self-assigned this
    on Aug 19, 2026
  4. cliffhall commented on Aug 19, 2026

    @cliffhall
    MemberAuthor

    Shipped in #2061, merged to v2/main as 471b865. nanoid 3.3.16 → 3.3.18 across all five lockfiles; npm audit --omit=dev is clean at the root and in each client install.

    Closing manually — Closes #2058 does not auto-close on a non-default base branch.

    The vite placement question is answered in the PR and recorded in the README: it is correctly a root dependency (runtime import in start-vite-dev-server.ts, external in the runner bundle), so it stays. The dev-only esbuild advisory noted along the way is split out as #2062.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

choreMaintenance: deps, build tooling, CI, cleanup — no user-facing behavior changev2Issues and PRs for v2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions