PyTorch Lightning loads untrusted checkpoint files without safety checks
What this means
An attacker who provides a checkpoint file to your training system can run code with the same permissions as the user running PyTorch Lightning. This means they could read training data, steal model weights, modify the model, or pivot to other systems on your network.
SecurityElites Manager Brief: the decision in one minute
PyTorch Lightning ignores safety settings when loading checkpoint files, allowing code execution if a checkpoint is crafted by an attacker. Any team that uses PyTorch Lightning to train models needs to verify they are not loading checkpoints from untrusted sources until a fix is available.
| SecurityElites Fix-First Score | 40 of 100 Our own ranking of what to fix first. Real attacks count most, then the chance of attack, then severity. |
|---|---|
| SecurityElites fix window | Within 30 days High severity. This is our suggestion from common practice; your own policy comes first. |
| Who should own the fix | Machine learning or ML ops team, working with security to control checkpoint sources. |
| Likely effort | An estimate of 2 to 4 hours: identifying all places checkpoints are loaded, adding controls to verify their source, and testing that training still works. This could take longer if checkpoints come from many different sources or if you need to rotate credentia |
Questions to ask your team or supplier
- Do we load PyTorch Lightning checkpoints from external sources or users, and if so, how do we verify they are trustworthy before loading?
- What data, credentials, or systems does the user account running PyTorch Lightning have access to, and can we restrict it further?
- Has our team loaded external checkpoints recently, and do we have logs that show whether anything unusual happened during those training runs?
Message you can forward to the owning team
Security notice: PyTorch Lightning loads untrusted checkpoint files without safety checks (CVE-2026-142196)
Severity: High (7.3 of 10)
SecurityElites Fix-First Score: 40 of 100
SecurityElites fix window: Within 30 days
Action: no fixed version is listed yet; apply the risk-reduction steps and watch the vendor advisory.
What we need from you: confirm whether we run this software, who owns it, and the date it will be fixed.
Full guide: https://securityelites.com/ai-vulnerabilities/cve-2026-142196-pytorch-lightning-loads-untrusted-checkpoint-files-without-safety-checks/
Source: SecurityElites AI Vulnerabilities Database, record SE-AIV-01972What is at stake in your AI setup
- Model weights in checkpoint files could be read, stolen, or poisoned by an attacker who provides a crafted checkpoint.
- Training data accessed during the training run could be read and exfiltrated if malicious code executes with the training user's permissions.
- API keys or credentials for model registries and cloud storage services could be stolen if stored in memory or on disk where the training process can read them.
Who is exposed
- Teams that load PyTorch Lightning checkpoints from external sources (cloud storage, user uploads, model registries).
- Training pipelines where checkpoints come from untrusted users or automated processes.
- Services that fine-tune or continue training from public or shared model checkpoints.
- Systems where the training user has access to production data or other sensitive resources.
Upgrades you need
| Software | Affected versions | Move to |
|---|---|---|
| Lightning-AI PyTorch Lightning | Every version up to and including 2.6.6 | No fixed version recorded. Follow the steps below. |
The fixed version here was taken from the wording of the official description, because the national database has not listed it yet.
Am I affected?
Enter the version you run. Nothing you type is stored.
SecurityElites Developer Brief: the technical picture
| Where the attacker must be | Already on the machine, or able to get a user to open something on it |
|---|---|
| Account needed | None. No login is needed |
| Does a person have to do something | Yes, a small ordinary action by a user |
| How hard it is to do | Hard. It depends on conditions the attacker does not control |
| Risk of: data being read | High |
| Risk of: data or settings being changed | High |
| Risk of: the service being taken down | High |
Read from the official severity rating: CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Kind of coding mistake
- CWE-502: untrusted data is loaded as objects
Where it sits in the standards
OWASP Top 10 for LLM Applications 2025: LLM03 Supply Chain (unsafe model and data files)
If you cannot upgrade today
- Create a dedicated, isolated user account for training jobs with no access to production data, secrets, or other sensitive systems. Run PyTorch Lightning only under this restricted account.
- Load checkpoints only from storage you fully control and monitor, never from external sources or user-provided uploads, until a fixed version is available.
- Use network-level controls to block outbound connections from training machines to untrusted external networks, so that even if malicious code runs, it cannot exfiltrate data.
Signs it may already have been used against you
- Review training logs and job output for unexpected child processes, shell execution, or file operations that do not match normal training activity, especially during checkpoint loading.
- Check system audit logs (auditd, Windows Event Log) for new processes or unusual commands spawned by the training user around the time a checkpoint was loaded.
- Look for unexpected network connections initiated by the training process, especially outbound connections to external IP addresses.
- Inspect the checkpoint file itself for signs of tampering: unusual file size, modification time inconsistent with when it was created, or binary content that does not match a normal PyTorch checkpoint format.
SecurityElites Fix Guide: step by step
- Find all PyTorch Lightning installationsSearch your code repositories and running systems for imports of `lightning`, `pytorch_lightning`, or uses of `FSDPStrategy` and `load_checkpoint`. List every service and machine where PyTorch Lightning is used for training.
- Check the installed versionOn each machine or in each container where PyTorch Lightning is used, run a command to show the installed version. Record all versions found.
- Identify where checkpoints come fromFor each training job or service, document whether checkpoints are loaded from: code you wrote and control, your own storage, third-party model registries, user uploads, or other external sources. This tells you which systems are at highest risk.
- Review checkpoint loading codeFind all code that calls `load_checkpoint` or similar methods in PyTorch Lightning. Check whether the checkpoint source is validated or trusted before loading.
- Stop loading untrusted checkpointsUntil a fixed version is available, do not load checkpoints from external or untrusted sources. If you must load external checkpoints, download them to a separate offline machine first, inspect them for suspicious signs, and validate their integrity if possible.
- Check training logs for unusual activityReview logs from training runs in the past three to six months, especially any runs that used externally-sourced checkpoints. Look for unexpected commands, file access, network connections, or processes spawned during checkpoint loading.
- Rotate credentials used in trainingIf checkpoints from untrusted sources were loaded, rotate any API keys, database passwords, or cloud credentials that the training user had access to. This reduces the risk if an attacker ran code during the training run.
- Monitor for a fixed versionWatch the PyTorch Lightning repository and security advisories for a released fix. When one is available and tested, plan an upgrade to replace all installations of PyTorch Lightning with the fixed version and restart all training services.
How to confirm it is fixed: Confirm that all installations of PyTorch Lightning are at a version that includes a fix for this vulnerability, and that you no longer load checkpoints from untrusted external sources without additional validation controls in place.
SecurityElites Quick Fixes: copy and paste
Check PyTorch Lightning versionfor this issue
python -c "import lightning; print(lightning.__version__)"Find PyTorch Lightning imports in Python codefor this issue
grep -r "from lightning\|import lightning\|from pytorch_lightning\|import pytorch_lightning" --include="*.py" .Load PyTorch weights without running codegeneral hardening
import torch
state = torch.load("model.pt", weights_only=True)Load safetensors weightsgeneral hardening
from safetensors.torch import load_file
state = load_file("model.safetensors")Test in a non-production environment first. General hardening examples use placeholder names and ports; change them to match your setup.
SecurityElites Incident Drill: could your team handle this?
Four questions to ask in your next team meeting. If any has no clear answer, that is the gap to close.
Ticket for your backlog
Paste into Jira, GitHub Issues or any tracker that reads Markdown.
Ready-made ticket
## PyTorch Lightning loads untrusted checkpoint files without safety checks (CVE-2026-142196)
**Severity:** High 7.3 | **SE Fix-First Score:** 40/100 | **Fix window:** Within 30 days
**Record:** SE-AIV-01972 https://securityelites.com/ai-vulnerabilities/cve-2026-142196-pytorch-lightning-loads-untrusted-checkpoint-files-without-safety-checks/
### Why this matters
An attacker who provides a checkpoint file to your training system can run code with the same permissions as the user running PyTorch Lightning. This means they could read training data, steal model weights, modify the model, or pivot to other systems on your network.
### What to do
1. Find all PyTorch Lightning installations
2. Check the installed version
3. Identify where checkpoints come from
4. Review checkpoint loading code
5. Stop loading untrusted checkpoints
6. Check training logs for unusual activity
7. Rotate credentials used in training
8. Monitor for a fixed version
Full steps: https://securityelites.com/ai-vulnerabilities/cve-2026-142196-pytorch-lightning-loads-untrusted-checkpoint-files-without-safety-checks/
### Done when
- [ ] The risk-reduction steps are applied and the vendor advisory is being watched for a fixed version
- [ ] Lock files, container images and CI configuration are updated
- [ ] Confirm that all installations of PyTorch Lightning are at a version that includes a fix for this vulnerability, and that you no longer load checkpoints from untrusted external sources without additional validation controls in place.
- [ ] Logs were checked for signs of earlier use
SecurityElites Fix Tracker
Record who owns this fix, the date it is due and when it is done, and see everything still open in one list. Free with a SecurityElites account.
Related vulnerabilities
The same kind of mistake in other AI tools
- PocketSphinx acoustic and language model loaders accept malicious files High · CVE-2026-142205
- Listdom WordPress plugin allows anyone to run code on the server Critical · CVE-2026-126756
- DLOmix can run attacker code when loading PyTorch model files High · CVE-2026-141343
- HoloViz Lumen lets dashboard viewers run Python code on the server High · CVE-2026-141342
- RVC-Boss GPT-SoVITS can be made to run code when loading model files Critical · CVE-2026-140281
Change history
- 2 Dec 2026: Made public
- 2 Dec 2026: Fixed version added, from the vendor's own CVE record
- 2 Dec 2026: Fixed version added, from the wording of the official description
- 2 Dec 2026: Published
- 2 Dec 2026: Fixed version added, from the wording of the official description
Official record
PyTorch Lightning through 2.6.6 contains an insecure deserialization vulnerability in FSDPStrategy.load_checkpoint that ignores weights_only=True when loading local single-file checkpoints. Attackers who supply a crafted checkpoint can embed a pickle payload that _LazyLoadingUnpickler resolves through unrestricted find_class, executing code as the training user.
Weakness type: CWE-502
Use this record in your own tools
Get this record as JSON
curl https://securityelites.com/wp-json/se-aivd/v1/vulns/CVE-2026-142196For scanners and pipelines: OSV format · CycloneDX format · API guide · Email alerts · Fix tracker
The plain-language sections were written with AI from the official record, and the upgrade versions come directly from the official data. Last updated 3 Dec 2026. Read the vendor advisory before changing a production system.