CVE-2025-2953: Torch Denial of Service Vulnerability

LOW
Advisory Identifier: GHSA-3749-ghw9-m3mg
CVSS 3.3
CWE-404
Published
Advisory Summary

CVE-2025-2953 is a LOW (CVSS 3.3) denial of service vulnerability (CWE-404: Improper Resource Shutdown or Release) affecting Torch libraries in the PyPI ecosystem. The issue involves pytorch susceptible to local denial of service. Remediation is available by upgrading affected packages to version 2.7.1-rc1.

CVE-2025-2953 at a Glance

CVE Identifier CVE-2025-2953
GHSA Identifier GHSA-3749-ghw9-m3mg
Severity LOW
CVSS v3.1 Base Score 3.3
CWE Classification CWE-404: Improper Resource Shutdown or Release
Affected Product Torch
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 3.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:N/I:N/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 None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2025-2953

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.7.1-rc1
pip install torch>=2.7.1-rc1
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-2953, 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.7.1-rc1), 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-404: Improper Resource Shutdown or Release, where the product does not release or incorrectly releases a resource before it is made available for re-use. 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, which was classified as problematic, has been found in PyTorch 2.6.0+cu124. Affected by this issue is the function torch.mkldnn_max_pool2d. The manipulation leads to denial of service. An attack has to be approached locally. The exploit has been disclosed to the public and may be used.

CVE-2025-2953 Affected Torch Versions

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

References

Frequently Asked Questions

What is CVE-2025-2953?
CVE-2025-2953 is a security vulnerability in Torch involving PyTorch susceptible to local Denial of Service under CWE-404: Improper Resource Shutdown or Release.
Which Torch versions are affected?
Affected versions include releases prior to 2.7.1-rc1 across affected packages: torch.
What version fixes CVE-2025-2953?
Upgrading to 2.7.1-rc1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is torch affected?
Yes, torch is affected in releases prior to 2.7.1-rc1. Upgrade your dependency to 2.7.1-rc1 or later.
What is the CVSS score of CVE-2025-2953?
CVE-2025-2953 has a CVSS v3.1 base score of 3.3 (LOW) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2025-2953?
CVE-2025-2953 is classified under CWE-404: Improper Resource Shutdown or Release (The product does not release or incorrectly releases a resource before it is made available for re-use.).
How can I check PyPI dependencies for CVE-2025-2953?
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-3749-ghw9-m3mg",
  "modified" : "2026-06-08T19:50:11Z",
  "published" : "2025-03-30T18:30:24Z",
  "aliases" : [ "CVE-2025-2953" ],
  "summary" : "PyTorch susceptible to local Denial of Service",
  "details" : "A vulnerability, which was classified as problematic, has been found in PyTorch 2.6.0+cu124. Affected by this issue is the function torch.mkldnn_max_pool2d. The manipulation leads to denial of service. An attack has to be approached locally. 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:N/I:N/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "torch"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.7.1-rc1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-2953"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pytorch/pytorch/issues/149274"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pytorch/pytorch/issues/149274#issue-2923122269"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/torch/PYSEC-2025-191.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pytorch/pytorch"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?ctiid.302006"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?id.302006"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?submit.521279"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-404" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-04-15T21:24:26Z",
    "nvd_published_at" : "2025-03-30T16:15:14Z"
  }
}