Vulnerabilities in pkg:pypi/torch

PACKAGE
Advisory Identifier: GHSA-rrmf-rvhw-rf47
Advisory Summary

CVE-2025-3000 is a LOW (CVSS 5.3) pytorch is vulnerable to memory vulnerability (CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer) affecting Torch libraries in the PyPI ecosystem. The issue involves pytorch is vulnerable to memory corruption through its torch.jit.script function. Remediation is available by upgrading affected packages to version 2.13.0.

13 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/torch

13 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/torch. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-rrmf-rvhw-rf47 CVE-2025-3000 LOW PyTorch is vulnerable to memory corruption through its torch.jit.script function
GHSA-qfhq-4f3w-5fph CVE-2025-3001 LOW PyTorch is vulnerable to memory corruption through its torch.lstm_cell function
GHSA-vgrw-7cvw-pwgx CVE-2025-2999 MODERATE PyTorch is vulnerable to memory corruption through its unpack_sequence function
GHSA-x3gm-94wq-g975 CVE-2025-2149 LOW PyTorch: Manipulation of the argument scale/zero_point leads to improper initialization via Quantized Sigmoid Module
GHSA-f4hp-rmr7-r7v8 CVE-2025-2998 MODERATE PyTorch is Vulnerable to Memory Consumption through pad_packed_sequence Function
GHSA-c678-jfcj-6jmf CVE-2025-2148 LOW PyTorch Tuple Handler is Vulnerable to Memory Corruption through Manipulation of None Argument
GHSA-3749-ghw9-m3mg CVE-2025-2953 LOW PyTorch susceptible to local Denial of Service
GHSA-887c-mr87-cxwp CVE-2025-3730 MODERATE PyTorch Improper Resource Shutdown or Release vulnerability
GHSA-53q9-r3pm-6pq6 CVE-2025-32434 CRITICAL PyTorch: `torch.load` with `weights_only=True` leads to remote code execution
GHSA-5pcm-hx3q-hm94 CVE-2024-31580 HIGH PyTorch heap buffer overflow vulnerability
GHSA-pg7h-5qx3-wjr3 CVE-2024-31583 HIGH Pytorch use-after-free vulnerability
GHSA-4vmg-rw8f-92f9 CVE-2024-7804 CRITICAL Withdrawn Advisory: PyTorch deserialization vulnerability
GHSA-47fc-vmwq-366v CVE-2022-45907 CRITICAL PyTorch vulnerable to arbitrary code execution

CVE-2025-3000 at a Glance

CVE Identifier CVE-2025-3000
GHSA Identifier GHSA-rrmf-rvhw-rf47
Severity LOW
CVSS v3.1 Base Score 5.3
CWE Classification CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer
Affected Product Torch
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2025-3000

To remediate this vulnerability, upgrade all affected Torch dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

torch fixed: 2.13.0
pip install torch>=2.13.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show torch

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2025-3000, inspect your installed packages using pip:

pip show torch

Analyze the terminal output to locate any version of Torch in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.13.0), your application is affected.

Note: The pip show torch command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer, where the product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. this may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data. In Torch, 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

A vulnerability classified as critical has been found in PyTorch 2.6.0. This affects the function torch.jit.script. The manipulation leads to memory corruption. It is possible to launch the attack on the local host. The exploit has been disclosed to the public and may be used.

CVE-2025-3000 Affected Torch Versions

1 component(s)
Fixed Versions:
2.13.0
Product / Package Ecosystem Affected Versions Fixed Version
torch
PyPI
< 2.13.0
2.13.0

References

Frequently Asked Questions

What is CVE-2025-3000?
CVE-2025-3000 is a security vulnerability in Torch involving PyTorch is vulnerable to memory corruption through its torch.jit.script function under CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer.
Which Torch versions are affected?
Affected versions include releases prior to 2.13.0 across affected packages: torch.
What version fixes CVE-2025-3000?
Upgrading to 2.13.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is torch affected?
Yes, torch is affected in releases prior to 2.13.0. Upgrade your dependency to 2.13.0 or later.
What is the CVSS score of CVE-2025-3000?
CVE-2025-3000 has a CVSS v3.1 base score of 5.3 (LOW) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2025-3000?
CVE-2025-3000 is classified under CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer (The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.).
How can I check PyPI dependencies for CVE-2025-3000?
Run the dependency tree command: 'pip show torch'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-rrmf-rvhw-rf47",
  "modified" : "2026-07-17T17:05:47Z",
  "published" : "2025-03-31T15:30:48Z",
  "aliases" : [ "CVE-2025-3000" ],
  "summary" : "PyTorch is vulnerable to memory corruption through its torch.jit.script function",
  "details" : "A vulnerability classified as critical has been found in PyTorch 2.6.0. This affects the function torch.jit.script. The manipulation leads to memory corruption. It is possible to launch the attack on the local host. The exploit has been disclosed to the public and may be used.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "torch"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.13.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.12.1"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-3000"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pytorch/pytorch/issues/149623"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pytorch/pytorch/issues/149623#issue-2935703015"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pytorch/pytorch/commit/b90c94991cdf8b87c8f7439f79518e0ef2c4ca4f"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/torch/PYSEC-2025-194.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pytorch/pytorch"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?ctiid.302049"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?id.302049"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?submit.524197"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-119" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-10T18:02:14Z",
    "nvd_published_at" : "2025-03-31T15:15:46Z"
  }
}