CVE-2026-58659 in PyTorch-Lightning: config keys ran code on checkpoint load
In PyTorch-Lightning up to 2.6.5, the _instantiator and _class_path config keys let a crafted checkpoint import and call an arbitrary Python class during load, bypassing weights_only=True. CVE-2026-58659 (CVSS 8.4) is fixed in pytorch-lightning 2.6.6 and jsonargparse 5.0.0.
- CVE-2026-58659: CVSS 8.4, affects pytorch-lightning <= 2.6.5
- weights_only=True did not help: the flaw is in the config, not tensors
- Fixed in pytorch-lightning 2.6.6 and jsonargparse 5.0.0
- Open static scanner jsonargparse_config_scan.py flags keys JAC001-JAC003
Read next
Security