UBUNTU-CVE-2026-31221

Source
https://ubuntu.com/security/CVE-2026-31221
Import Source
https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-31221.json
JSON Data
https://api.osv.dev/v1/vulns/UBUNTU-CVE-2026-31221
Upstream
Published
2026-05-12T16:16:00Z
Modified
2026-05-20T22:02:56Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H CVSS Calculator
  • 8.8 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H CVSS Calculator
  • Ubuntu - medium
Summary
[none]
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.

References

Affected packages

Ubuntu:22.04:LTS / pytorch

Package

Name
pytorch
Purl
pkg:deb/ubuntu/pytorch?arch=source&distro=jammy

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected

Affected versions

1.*
1.7.1-7
1.8.1-4

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"
        }
    ]
}

Database specific

source
"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-31221.json"

Ubuntu:25.10 / pytorch

Package

Name
pytorch
Purl
pkg:deb/ubuntu/pytorch?arch=source&distro=questing

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected

Affected versions

2.*
2.6.0+dfsg-5build1
2.6.0+dfsg-7

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"
        }
    ]
}

Database specific

source
"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-31221.json"

Ubuntu:26.04:LTS / pytorch

Package

Name
pytorch
Purl
pkg:deb/ubuntu/pytorch?arch=source&distro=resolute

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected

Affected versions

2.*
2.6.0+dfsg-7
2.6.0+dfsg-9
2.9.1+dfsg-1~exp1ubuntu2

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"
        }
    ]
}

Database specific

source
"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-31221.json"