Miggo Logo

CVE-2025-3730: PyTorch Improper Resource Shutdown or Release vulnerability

3.3

CVSS Score
3.1

Basic Information

EPSS Score
0.05654%
Published
4/16/2025
Updated
4/16/2025
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L
Package NameEcosystemVulnerable VersionsFirst Patched Version
torchpip<= 2.6.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability description identifies torch.nn.functional.ctc_loss in aten/src/ATen/native/LossCTC.cpp as affected. The provided commit patches (46fc5d8e360127361211cb237d5f9eef0223e567 and 01f226bfb8f2c343f5c614a6bbf685d91160f3af, which are identical) show that a check TORCH_CHECK(log_probs.numel() > 0, ...) was added to ctc_loss_cpu_template in aten/src/ATen/native/LossCTC.cpp and ctc_loss_gpu_template in aten/src/ATen/native/cuda/LossCTC.cu. This check prevents processing when log_probs is an empty tensor. The absence of this check in versions <= 2.6.0 is the vulnerability. An attacker can provide an empty log_probs tensor to torch.nn.functional.ctc_loss, which would then call these C++ functions, leading to a denial of service due to improper resource handling when processing the empty tensor. The Python function torch.nn.functional.ctc_loss is the user-facing entry point, and the C++ template functions at::native::ctc_loss_cpu_template and at::native::ctc_loss_gpu_template are the native implementations where the core vulnerable logic (or lack of validation) resided.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

* vuln*r**ility, w*i** w*s *l*ssi*i** *s pro*l*m*ti*, w*s *oun* in PyTor** *.*.*. *****t** is t** *un*tion tor**.nn.*un*tion*l.*t*_loss o* t** *il* *t*n/sr*/*T*n/n*tiv*/Loss*T*.*pp. T** m*nipul*tion l***s to **ni*l o* s*rvi**. *n *tt**k **s to ** *pp

Reasoning

T** vuln*r**ility **s*ription i**nti*i*s `tor**.nn.*un*tion*l.*t*_loss` in `*t*n/sr*/*T*n/n*tiv*/Loss*T*.*pp` *s *****t**. T** provi*** *ommit p*t***s (**************************************** *n* ****************************************, w*i** *r* i