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

Đang mở Phù hợp với người mới
#1,853 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
65/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, nodejs
Lĩnh vực
release

Hướng nghiên cứu

Gói tarball được xuất bản bao gồm .yarn/ và .yarnrc.yml, những thứ không bị loại trừ bởi .npmignore của repo. Bắt đầu bằng cách đọc .npmignore và so sánh với trường files trong package.json, sau đó chạy npm pack --dry-run để liệt kê những gì sẽ được xuất bản. Hoàn thành khi lần chạy dry run không còn liệt kê .yarn/ hoặc .yarnrc.yml, và thay đổi là thêm một mục ignore hoặc dùng allowlist. Hãy hỏi người duy trì dự án về cách tiếp cận họ ưa thích.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
JavaScript
Star
10.7k
Fork
1.2k
Merge trung bình
22 giờ 55 phút
Pull request đã merge (30 ngày)
25

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của foliojs/pdfkit

Tất cả issue của foliojs/pdfkit

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.