Skip to content

Commit 99c9823

Browse files
committed
fix(deps): nanoid 顶到 3.3.x 补丁线,清掉 GHSA-2v37-7h3g-55p8 (#6529)
OSV 门在锁文件上变红,因此对每一个 open PR 都生效,与各 PR 的改动内容无关。 本地以 osv-scanner v2.3.8(与 CI action 同版本)、同样的 `--lockfile=pnpm-lock.yaml` 参数复现:1387 个包,1 条 High(8.2)—— nanoid 3.3.16 命中 GHSA-2v37-7h3g-55p8 / CVE-2026-67213(自定义字母表在 size 为零时无限循环, 即拒绝服务),退出码 1。 公告带**两条**受影响区间:introduced:0 → fixed:3.3.17,以及 introduced:4.0.0 → fixed:5.1.6。此处只有第一条是活的:3.3.16 唯一由 postcss@8.5.25 间接引入(全锁文件仅一条 `nanoid:` 边),而四个 driver 直接声明的 nanoid ^6.0.0 高于第二条的修复线,本就不受影响。 上界按 AGENTS.md 与本块头部规则落在 target 之上的 **major 边界**(4.0.0), ⛔ 不写成 `<3.3.17` —— 那个形状会在 3.3.17 自己出公告那天当场失配 (undici 7.28.0 / brace-expansion 5.0.8 的活体标本,#4961 / #5032)。 `<4.0.0` 同时把 6.x 挡在选择器之外,正是它该待的地方。 ^3.3.17 落在 postcss 自己声明的 ^3.3.16 区间内,所以这是往补丁线上的一次 dedupe,而不是把 postcss 顶过它支持的范围。 解析版本位移实测:1387 个 packages 键 + 1387 个 snapshots 键 + 746 条 importer 边,逐一比对,**只有 nanoid 3.3.16 → 3.3.18 一处**(^3.3.17 在 3.x 内浮到最新,即 npm 的 legacy dist-tag),其余零位移。改后复跑同一扫描: No issues found,退出码 0,且 osv-scanner.toml 一字未动(仍是零豁免)。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BDmDsu2575gDxeMCxXhDE3
1 parent 61478b9 commit 99c9823

2 files changed

Lines changed: 30 additions & 4 deletions

File tree

pnpm-lock.yaml

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,3 +210,28 @@ overrides:
210210
# `<3.4.13`, which would self-invalidate the day 3.4.13 is itself flagged
211211
# (the undici 7.28.0 / brace-expansion 5.0.8 specimens, #4961 / #5032).
212212
'dompurify@<4.0.0': '^3.4.13'
213+
# OSV 2026-08-08 (#6529) — same "it names a fixed version, so take the fix"
214+
# disposition as the two batches above; no exemption is involved.
215+
# nanoid GHSA-2v37-7h3g-55p8 / CVE-2026-67213 (8.2 high) — a custom
216+
# alphabet generator loops forever when `size` is zero, so an
217+
# attacker-influenced size is a denial of service. The advisory carries
218+
# TWO affected ranges: introduced:0 → fixed:3.3.17, and
219+
# introduced:4.0.0 → fixed:5.1.6. Only the first one is live here.
220+
# Transitive-only via postcss@8.5.25, which declares nanoid ^3.3.16 and
221+
# was the single consumer pulling the flagged 3.3.16 (measured: one
222+
# `nanoid:` edge in the whole lockfile). Nothing in this workspace
223+
# declares a 3.x nanoid directly, so — exactly as for dompurify above —
224+
# check-override-consistency.mjs lists this as an override it cannot
225+
# cross-check against a declared range, which is correct for this shape.
226+
# ^3.3.17 sits INSIDE postcss's own ^3.3.16 range, so this is a dedupe
227+
# onto the patched line, not a forced upgrade past what postcss supports.
228+
# ⚠️ The four drivers that declare nanoid ^6.0.0 (driver-mongodb,
229+
# driver-sql, driver-sqlite-wasm, driver-turso) are deliberately OUT of
230+
# this selector: 6.0.0 is above the advisory's second fixed line (5.1.6)
231+
# and is not affected, and the <4.0.0 bound is what keeps it that way —
232+
# a bound written at the package ceiling would have dragged that whole
233+
# major back onto the 3.x line.
234+
# Bound at the 4.0.0 major boundary per this block's header rule — never
235+
# `<3.3.17`, which would self-invalidate the day 3.3.17 is itself flagged
236+
# (the undici 7.28.0 / brace-expansion 5.0.8 specimens, #4961 / #5032).
237+
'nanoid@<4.0.0': '^3.3.17'

0 commit comments

Comments
 (0)