pdfkit npm package ships the Yarn 4.16.0 binary (.yarn/releases) with outdated tar/js-yaml/got/picomatch
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 65/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- javascript, nodejs
- 领域
- release
调研方向
发布的 tarball 包含 .yarn/ 和 .yarnrc.yml,但仓库的 .npmignore 并未排除它们。请先阅读 .npmignore,并与 package.json 中的 files 字段进行比较,然后运行 npm pack --dry-run 列出将要发布的内容。完成标准是 dry run 结果中不再列出 .yarn/ 或 .yarnrc.yml,修改方式可以是添加一条忽略规则,也可以是使用白名单。请与维护者确认他们更倾向哪种方式。
由索引模型根据 Issue 内容生成。
描述
Since 0.18.0 the pdfkit tarball includes .yarn/releases/yarn-4.16.0.cjs (plus .yarn/install-state.gz and .yarnrc.yml). .npmignore does not exclude .yarn/. That file is a full Yarn bundle with these inlined libraries:
- tar 7.5.9: CVE-2026-29786 / CVE-2026-31802 (drive-relative link path traversal), CVE-2026-59871/59873/59874/59875/73566 (parser DoS/crash)
- js-yaml 3.14.1: CVE-2025-64718 (merge prototype pollution), CVE-2026-53550, CVE-2026-59869, GHSA-5p4m-2wfm-xmqj (quadratic CPU in merge/omap)
- got 11.8.2: CVE-2022-33987 (redirect to UNIX socket). micromatch 4.0.5: CVE-2024-4067 (ReDoS). picomatch 2.3.1/4.0.3: CVE-2026-33671 (extglob ReDoS)
None of these are declared in pdfkit's package.json, so npm audit and SCA tools cannot flag them for you or for pdfkit users, but they sit in every node_modules/pdfkit. pdfkit never loads the file, so this is about removing files that are published but unused.
Because the copy ships where dependency audits cannot see it, it is easy to miss. We would suggest updating it when convenient, and sooner if untrusted input can reach it in your setup.
Suggested fix: add .yarn/ and .yarnrc.yml to .npmignore (or add a files allowlist) and publish a new version. Bumping Yarn alone does not help, because Yarn 4.18.1 still bundles the same versions.
- 主要语言
- JavaScript
- 星标
- 10.7k
- 派生
- 1.2k
- 平均合并
- 21 小时 41 分钟
- 30 天内合并 PR
- 27
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
foliojs/pdfkit 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
PDFKit crashes when providing fonts as Buffer in table可能已有人在做 @ykw9263 于 131 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
foliojs/pdfkit#1743 · 13 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
foliojs/pdfkit#1512 · 1 条评论 · 2 个 reaction ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 45/100
维护者通常 1 天内回复
相似的 Issue
-
Handle HTTP errors when downloading release binaries可能已有人在做 @mugenkyou 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
neutralinojs/neutralinojs-cli#468 ·
维护者通常 1 天内回复
-
area:ci priority:p0 type:chore
难度 2/5 1-3 小时 新手友好度 70/100
lucacasanova/homedeck#2 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
terser/html-minifier-terser#242 ·
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 82/100
MustacheCase/zanadir#516 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
stylelint-scss/stylelint-config-standard-scss#297 · 1 条评论 ·