PyTorch-Lightning versions 2.6.0 and earlier contain an insecure deserialization vulnerability (CWE-502) in the checkpoint loading mechanism. The LightningModule.load_from_checkpoint() method, which is commonly used to load saved model states, internally calls torch.load() without setting the security-restrictive weights_only=True parameter. This default behavior allows the deserialization of arbitrary Python objects via the Pickle module. A remote attacker can exploit this by providing a maliciously crafted checkpoint file, leading to arbitrary code execution on the victim's system when the file is loaded.
PyTorch-Lightning versions 2.6.0 and earlier contain an insecure deserialization vulnerability in checkpoint loading that allows arbitrary code execution through maliciously crafted checkpoint files. Attackers can exploit the LightningModule.load_from_checkpoint() method which uses unsafe torch.load() without weights_only=True parameter.
تحتوي ثغرة CVE-2026-31221 على ضعف في آلية فك التسلسل غير الآمنة في PyTorch-Lightning حيث تستخدم دالة torch.load() بدون تفعيل معامل الأمان weights_only=True. يمكن للمهاجمين إنشاء ملفات نقاط تفتيش ضارة تحتوي على كائنات Python عشوائية يتم تنفيذها عند التحميل. هذا يؤدي إلى تنفيذ كود عشوائي كامل على أنظمة الضحايا.
PyTorch-Lightning الإصدارات 2.6.0 وما قبلها تحتوي على ثغرة فك تسلسل غير آمنة في آلية تحميل نقاط التفتيش تسمح بتنفيذ كود عشوائي. يمكن للمهاجمين استغلال طريقة LightningModule.load_from_checkpoint() التي تستخدم torch.load() غير الآمنة.
Upgrade PyTorch-Lightning to version 2.6.1 or later immediately. Implement strict file validation and integrity checks before loading checkpoint files. Restrict checkpoint file sources to trusted locations only. Monitor and log all checkpoint loading operations. Consider using sandboxed environments for model inference. Validate checkpoint file signatures using cryptographic methods.
قم بترقية PyTorch-Lightning إلى الإصدار 2.6.1 أو أحدث فوراً. طبق التحقق الصارم من صحة الملفات قبل تحميل نقاط التفتيش. قيد مصادر ملفات نقاط التفتيش للمواقع الموثوقة فقط. راقب وسجل جميع عمليات تحميل نقاط التفتيش. استخدم بيئات معزولة لاستدلال النموذج. تحقق من توقيعات ملفات نقاط التفتيش باستخدام الطرق التشفيرية.