pnpm is a package manager. Versions 10.26.2 and below store HTTP tarball dependencies (and git-hosted tarballs) in the lockfile without integrity hashes. This allows the remote server to serve different content on each install, even when a lockfile is committed. An attacker who publishes a package with an HTTP tarball dependency can serve different code to different users or CI/CD environments. The attack requires the victim to install a package that has an HTTP/git tarball in its dependency tree. The victim's lockfile provides no protection. This issue is fixed in version 10.26.0.
pnpm versions 10.26.2 and below fail to store integrity hashes for HTTP and git-hosted tarball dependencies in lockfiles, allowing remote servers to serve malicious code to different users even with committed lockfiles. Attackers can exploit this to deliver targeted malicious payloads to specific victims or CI/CD pipelines without detection.
تتيح هذه الثغرة الأمنية الحرجة في مدير الحزم pnpm للمهاجمين تقديم محتوى متغير وخبيث عبر تبعيات HTTP وgit tarball دون أن يوفر ملف القفل أي حماية. عند تثبيت حزمة تحتوي على تبعية HTTP tarball في شجرة التبعيات، يمكن للخادم البعيد تقديم أكواد مختلفة لكل عملية تثبيت، مما يسمح بهجمات سلسلة التوريد المستهدفة. تؤثر الثغرة على بيئات التطوير وأنظمة CI/CD التي تعتمد على pnpm لإدارة التبعيات، حيث يمكن حقن أكواد خبيثة دون ترك أثر في ملفات القفل المحفوظة في أنظمة التحكم بالإصدارات.
الإصدارات 10.26.2 وما دونها من مدير الحزم pnpm تفشل في تخزين قيم التحقق من السلامة لتبعيات حزم HTTP وgit في ملفات القفل، مما يسمح للخوادم البعيدة بتقديم أكواد خبيثة لمستخدمين مختلفين حتى مع وجود ملفات قفل محفوظة. يمكن للمهاجمين استغلال هذه الثغرة لتوصيل حمولات خبيثة مستهدفة لضحايا محددين أو خطوط CI/CD دون اكتشاف.
1. Immediately upgrade pnpm to version 10.26.0 or later across all development environments, CI/CD pipelines, and build systems to ensure integrity hash validation for all tarball dependencies
2. Conduct comprehensive audit of all package.json and pnpm-lock.yaml files to identify and remove HTTP/git tarball dependencies, replacing them with verified npm registry packages with proper integrity hashes
3. Implement strict dependency management policies requiring all packages to come from trusted registries only, enable Subresource Integrity (SRI) checks, and configure automated scanning tools to detect and block HTTP tarball dependencies in future installations
1. الترقية الفورية لمدير الحزم pnpm إلى الإصدار 10.26.0 أو أحدث في جميع بيئات التطوير وخطوط CI/CD وأنظمة البناء لضمان التحقق من قيم السلامة لجميع تبعيات الحزم
2. إجراء مراجعة شاملة لجميع ملفات package.json وpnpm-lock.yaml لتحديد وإزالة تبعيات حزم HTTP/git واستبدالها بحزم موثوقة من سجلات npm مع قيم سلامة صحيحة
3. تطبيق سياسات صارمة لإدارة التبعيات تتطلب أن تأتي جميع الحزم من سجلات موثوقة فقط، وتفعيل فحوصات سلامة الموارد الفرعية (SRI)، وتكوين أدوات المسح الآلي لاكتشاف ومنع تبعيات حزم HTTP في التثبيتات المستقبلية