ubuntu-cve-2026-31221
Vulnerability from osv_ubuntu
Published
2026-05-12 16:16
Modified
2026-05-20 21:46
Summary
Details
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.
Severity
7.8 (High)
8.8 (High)
N/A (UNKNOWN)
References
| URL | Type | |
|---|---|---|
{
"affected": [
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libtorch-test",
"binary_version": "1.8.1-4"
},
{
"binary_name": "libtorch1.8",
"binary_version": "1.8.1-4"
},
{
"binary_name": "python3-torch",
"binary_version": "1.8.1-4"
}
]
},
"package": {
"ecosystem": "Ubuntu:22.04:LTS",
"name": "pytorch",
"purl": "pkg:deb/ubuntu/pytorch@1.8.1-4?arch=source\u0026distro=jammy"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"1.7.1-7",
"1.8.1-4"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libtorch-test",
"binary_version": "2.6.0+dfsg-7"
},
{
"binary_name": "libtorch2.6",
"binary_version": "2.6.0+dfsg-7"
},
{
"binary_name": "python3-torch",
"binary_version": "2.6.0+dfsg-7"
}
]
},
"package": {
"ecosystem": "Ubuntu:25.10",
"name": "pytorch",
"purl": "pkg:deb/ubuntu/pytorch@2.6.0+dfsg-7?arch=source\u0026distro=questing"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.6.0+dfsg-5build1",
"2.6.0+dfsg-7"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libtorch-test",
"binary_version": "2.9.1+dfsg-1~exp1ubuntu2"
},
{
"binary_name": "libtorch2.9",
"binary_version": "2.9.1+dfsg-1~exp1ubuntu2"
},
{
"binary_name": "python3-torch",
"binary_version": "2.9.1+dfsg-1~exp1ubuntu2"
}
]
},
"package": {
"ecosystem": "Ubuntu:26.04:LTS",
"name": "pytorch",
"purl": "pkg:deb/ubuntu/pytorch@2.9.1+dfsg-1~exp1ubuntu2?arch=source\u0026distro=resolute"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.6.0+dfsg-7",
"2.6.0+dfsg-9",
"2.9.1+dfsg-1~exp1ubuntu2"
]
}
],
"aliases": [],
"details": "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\u0027s system when the file is loaded.",
"id": "UBUNTU-CVE-2026-31221",
"modified": "2026-05-20T21:46:15Z",
"published": "2026-05-12T16:16:00Z",
"references": [
{
"type": "REPORT",
"url": "https://ubuntu.com/security/CVE-2026-31221"
},
{
"type": "REPORT",
"url": "https://www.cve.org/CVERecord?id=CVE-2026-31221"
}
],
"related": [],
"schema_version": "1.7.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "medium",
"type": "Ubuntu"
}
],
"upstream": [
"CVE-2026-31221"
]
}
Loading…
Loading…
Experimental. This forecast is provided for visualization only and may change without notice. Do not use it for operational decisions.
Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…