Improper Resource Shutdown or Release Affecting torch package, versions [0,]


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.01% (2nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-TORCH-9634167
  • published3 Apr 2025
  • disclosed30 Mar 2025
  • creditdefault1360

Introduced: 30 Mar 2025

NewCVE-2025-2953  (opens in a new tab)
CWE-404  (opens in a new tab)

How to fix?

There is no fixed version for torch.

Overview

torch is a Tensors and Dynamic neural networks in Python with strong GPU acceleration

Affected versions of this package are vulnerable to Improper Resource Shutdown or Release via the torch.mkldnn_max_pool2d function. An attacker can disrupt service by exploiting this vulnerability locally and causing a Floating point exception crash.

PoC

import torch

x = torch.randn(2, 64, 32, 32).to_mkldnn()
out2 = torch.mkldnn_max_pool2d(x, kernel_size=3, stride=0)

CVSS Base Scores

version 4.0
version 3.1