Bug 2476502 (CVE-2026-31221) - CVE-2026-31221 pytorch-lightning: PyTorch-Lightning: Arbitrary code execution via insecure deserialization of checkpoint files
Summary: CVE-2026-31221 pytorch-lightning: PyTorch-Lightning: Arbitrary code execution...
Keywords:
Status: NEW
Alias: CVE-2026-31221
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-05-12 16:01 UTC by OSIDB Bzimport
Modified: 2026-08-25 06:52 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2026-05-12 16:01:24 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.