Skip to content

fix(deps): bump nanoid and brace-expansion past DoS advisories - #1577

Open
shabaraba wants to merge 1 commit into
mainfrom
fix/fix-dep-dos-cves
Open

shabaraba wants to merge 1 commit into
mainfrom
fix/fix-dep-dos-cves

Conversation

@shabaraba

Copy link
Copy Markdown
Member

Why

These transitive dependencies had known DoS advisories. Bumping them to patched
versions removes the vulnerable code paths and clears dependency scanner alerts.

  • CVE-2026-67214 — nanoid (nanoid/non-secure): infinite loop on a negative
    size argument.
  • CVE-2026-69152 — brace-expansion: resource exhaustion via unbounded
    intermediate arrays.

What

Raise the pnpm.overrides floors to patched versions and refresh the lockfile
(lockfile-only; no source changes). Both packages are transitive, so the
override pins the security floor across the dependency graph:

  • nanoid@^3: >=3.3.16 <4 (kept on the 3.x / CJS line) → 3.3.18
  • brace-expansion@^1: >=1.1.18 <2 → 1.1.18
  • brace-expansion@^2: >=2.1.4 <3 → 2.1.4
  • brace-expansion@^5: >=5.0.9 → 5.0.9 (already satisfied)

How to test

Lockfile-only change. Verified no vulnerable nanoid / brace-expansion version
remains in pnpm-lock.yaml. Relying on CI pnpm lint / pnpm test to confirm
the graph still resolves and builds (not run locally).

Checklist

  • Read CONTRIBUTING.md
  • Updated documentation if it is required.
  • Added/updated tests if it is required. (or tested manually)
  • Passed pnpm lint and pnpm test on the root directory.

Pin patched floors via pnpm.overrides and refresh the lockfile
(both are transitive dependencies):
- CVE-2026-67214: nanoid >= 3.3.16 <4 (kept on the 3.x/CJS line)
- CVE-2026-69152: brace-expansion >= 1.1.18 / 2.1.4 / 5.0.9

CVE-2025-71329 (image-size) has no upstream patch (latest is 2.0.2);
tracked separately until a fixed release ships.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@shabaraba
shabaraba force-pushed the fix/fix-dep-dos-cves branch from 521c800 to 663882f Compare August 12, 2026 00:45
@shabaraba
shabaraba marked this pull request as ready for review August 12, 2026 05:58
Copilot AI lite review requested due to automatic review settings August 12, 2026 05:58
@shabaraba
shabaraba requested a review from a team as a code owner August 12, 2026 05:58
@shabaraba
shabaraba requested review from chihiro-adachi and nameless-mc and removed request for a team August 12, 2026 05:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates dependency override floors to address reported DoS advisories in transitive dependencies (nanoid, brace-expansion) and refreshes the pnpm lockfile so the resolved graph no longer includes the flagged versions.

Changes:

  • Adds a pnpm.overrides entry for nanoid@^3 and raises brace-expansion override floors for ^1 and ^2.
  • Refreshes pnpm-lock.yaml to reflect updated overrides/resolutions (including resolved nanoid@3.3.18, brace-expansion@1.1.18, brace-expansion@2.1.4).

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 3 comments.

File Description
package.json Updates pnpm.overrides floors (adds nanoid override; bumps brace-expansion floors).
pnpm-lock.yaml Lockfile refresh reflecting updated overrides and resolved patched versions.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread package.json
Comment on lines 121 to +125
"undici": ">=7.18.2",
"ws": ">=8.21.3",
"brace-expansion@^1": ">=1.1.16 <2",
"brace-expansion@^2": ">=2.1.2 <3",
"nanoid@^3": ">=3.3.16 <4",
"brace-expansion@^1": ">=1.1.18 <2",
"brace-expansion@^2": ">=2.1.4 <3",
Comment thread pnpm-lock.yaml
Comment on lines 9 to +13
undici: '>=7.18.2'
ws: '>=8.21.3'
brace-expansion@^1: '>=1.1.16 <2'
brace-expansion@^2: '>=2.1.2 <3'
nanoid@^3: '>=3.3.16 <4'
brace-expansion@^1: '>=1.1.18 <2'
brace-expansion@^2: '>=2.1.4 <3'
Comment thread package.json
Comment on lines 118 to +124
"pnpm": {
"overrides": {
"braces": ">=3.0.3",
"undici": ">=7.18.2",
"ws": ">=8.21.3",
"brace-expansion@^1": ">=1.1.16 <2",
"brace-expansion@^2": ">=2.1.2 <3",
"nanoid@^3": ">=3.3.16 <4",
"brace-expansion@^1": ">=1.1.18 <2",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants