pdfkit npm package ships the Yarn 4.16.0 binary (.yarn/releases) with outdated tar/js-yaml/got/picomatch

オープン 初心者向け
#1,853 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
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 が含まれなくなれば完了です。変更は ignore エントリの追加か allowlist のどちらかです。どちらの方法がよいかはメンテナーに確認してください。

索引モデルが 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
平均マージ
1日 9時間
マージ済み PR(30日)
15

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

foliojs/pdfkit のほかの issue

foliojs/pdfkit の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。