GuardDog is a CLI tool to identify malicious PyPI packages. Prior to 2.7.1, GuardDog's safe_extract() function does not validate decompressed file sizes when extracting ZIP archives (wheels, eggs), allowing attackers to cause denial of service through zip bombs. A malicious package can consume gigabytes of disk space from a few megabytes of compressed data. This vulnerability is fixed in 2.7.1.
GuardDog versions prior to 2.7.1 are vulnerable to zip bomb attacks through improper decompression validation in the safe_extract() function. Attackers can craft malicious PyPI packages that consume excessive disk space, causing denial of service. This vulnerability directly impacts organizations using GuardDog for supply chain security scanning, potentially disabling their malware detection capabilities during critical security operations.
1. IMMEDIATE: Upgrade GuardDog to version 2.7.1 or later across all development and security scanning environments
2. Identify all systems running GuardDog versions < 2.7.1 using: pip show guarddog | grep Version
3. Implement temporary compensating control: Configure filesystem quotas on scanning directories to limit disk space consumption per process
4. Monitor disk usage patterns on scanning servers for anomalous spikes indicating zip bomb exploitation
5. Add detection rule: Alert on decompressed file sizes exceeding 100x compressed size during package extraction
6. Review recent GuardDog scan logs for suspicious package behavior or extraction failures
7. Implement network-based controls to restrict PyPI package downloads to vetted sources only
8. Test patch deployment in non-production environment before production rollout
1. فوري: ترقية GuardDog إلى الإصدار 2.7.1 أو أحدث عبر جميع بيئات التطوير والفحص الأمني
2. تحديد جميع الأنظمة التي تقوم بتشغيل إصدارات GuardDog < 2.7.1 باستخدام: pip show guarddog | grep Version
3. تنفيذ تحكم تعويضي مؤقت: تكوين حصص نظام الملفات على أدلة الفحص لتحديد استهلاك مساحة القرص لكل عملية
4. مراقبة أنماط استخدام القرص على خوادم الفحص للكشف عن الارتفاعات الشاذة التي تشير إلى استغلال قنابل الضغط
5. إضافة قاعدة الكشف: تنبيه عند تجاوز أحجام الملفات المستخرجة 100 مرة حجم البيانات المضغوطة أثناء استخراج الحزمة
6. مراجعة سجلات فحص GuardDog الأخيرة للبحث عن سلوك حزمة مريب أو فشل الاستخراج
7. تنفيذ عناصر تحكم قائمة على الشبكة لتقييد تنزيلات حزم PyPI إلى المصادر المعتمدة فقط
8. اختبار نشر التصحيح في بيئة غير الإنتاج قبل نشر الإنتاج