Vulnerabilities in pkg:pypi/pytorch
PACKAGECVE-2026-24747 is a HIGH (CVSS 8.8) remote code execution vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Pytorch libraries in the PyPI ecosystem. The issue involves pytorch vulnerable to remote code execution via untrusted checkpoint files. Remediation is available by upgrading affected packages to version 2.10.0.
pkg:pypi/pytorch
Vulnerability advisories affecting package pkg:pypi/pytorch. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-63cw-57p8-fm3p | CVE-2026-24747 | HIGH | PyTorch Vulnerable to Remote Code Execution via Untrusted Checkpoint Files |
CVE-2026-24747 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H).
How to Fix CVE-2026-24747
To remediate this vulnerability, upgrade all affected Pytorch dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install pytorch>=2.10.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show pytorch
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-24747, inspect your installed packages using pip:
pip show pytorch
Analyze the terminal output to locate any version of Pytorch in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.10.0), your application is affected.
Note: The pip show pytorch command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Pytorch, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-24747 Affected Pytorch Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pytorch
|
PyPI |
< 2.10.0
|
2.10.0
|
References
Frequently Asked Questions
What is CVE-2026-24747?
Which Pytorch versions are affected?
What version fixes CVE-2026-24747?
Is pytorch affected?
What is the CVSS score of CVE-2026-24747?
What CWE is associated with CVE-2026-24747?
How can I check PyPI dependencies for CVE-2026-24747?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-63cw-57p8-fm3p",
"modified" : "2026-01-29T03:42:52Z",
"published" : "2026-01-27T20:10:54Z",
"aliases" : [ "CVE-2026-24747" ],
"summary" : "PyTorch Vulnerable to Remote Code Execution via Untrusted Checkpoint Files",
"details" : "### Summary\n\nA vulnerability in PyTorch's `weights_only` unpickler allows an attacker to craft a malicious checkpoint file (`.pth`) that, when loaded with `torch.load(..., weights_only=True)`, can corrupt memory and potentially lead to arbitrary code execution.\n\n### Vulnerability Details\n\nThe `weights_only=True` unpickler failed to properly validate pickle opcodes and storage metadata, allowing:\n\n1. **Heap memory corruption** via `SETITEM`/`SETITEMS` opcodes applied to non-dictionary types\n2. **Storage size mismatch** between declared element count and actual data in the archive\n\n### Impact\n\nAn attacker who can convince a user to load a malicious checkpoint file may achieve arbitrary code execution in the context of the victim's process.\n\n\n# Credit\nJi'an Zhou",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "pytorch"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.10.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/pytorch/pytorch/security/advisories/GHSA-63cw-57p8-fm3p"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-24747"
}, {
"type" : "WEB",
"url" : "https://github.com/pytorch/pytorch/issues/163105"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pytorch/pytorch"
}, {
"type" : "WEB",
"url" : "https://github.com/pytorch/pytorch/163122/commit/954dc5183ee9205cbe79876ad05dd2d9ae752139"
}, {
"type" : "WEB",
"url" : "https://github.com/pytorch/pytorch/releases/tag/v2.10.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-502", "CWE-94" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-01-27T20:10:54Z",
"nvd_published_at" : "2026-01-27T22:15:56Z"
}
}