CVE-2025-3730: PyTorch Denial of Service Vulnerability in ctc_loss Function

torch Updated 07 Jul 2026

Summary

07/07/2026
Yes i
Moderate
3.3

CVE-2025-3730: PyTorch Improper Resource Shutdown or Release vulnerability. Affects torch versions < 2.8.0. Fixed in 2.8.0. How to fix ↓

Also tracked for

The same CVE-2025-3730 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

PyTorch is an open-source machine learning library widely used for applications such as computer vision and natural language processing. It provides a flexible and efficient platform for building deep learning models. The library includes various functionalities, including loss functions, which are crucial for training models. However, a vulnerability has been identified in the ctc_loss function, which can lead to denial of service under certain conditions.

Vulnerability Detail

A vulnerability classified as problematic was discovered in PyTorch version 2.6.0, specifically in the torch.nn.functional.ctc_loss function located in aten/src/ATen/native/LossCTC.cpp. This vulnerability allows for improper resource shutdown or release, leading to potential denial of service. The issue can be exploited locally, and the exploit has been publicly disclosed, making it a significant concern for users of the affected version.

How To Fix

Latest published version: 2.14.1 as of 22 Oct 2026

pip install --upgrade "torch==2.14.1"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.8.0

This is the first release that contains the fix.

pip install --upgrade "torch==2.8.0"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

Currently, no specific workarounds have been provided for this vulnerability. The best course of action is to update to the patched version as mentioned above.

Conclusion

In summary, a denial of service vulnerability has been identified in PyTorch version 2.6.0, specifically in the ctc_loss function. Users are strongly encouraged to update to version 2.8.0 or later to mitigate the risks associated with this vulnerability. Regular monitoring and timely updates are essential for maintaining the security of your applications.

See every vulnerability recorded for torch →

Share this vulnerability

FAQ

The vulnerability is related to improper resource shutdown or release in the ctc_loss function of PyTorch, leading to potential denial of service.

The vulnerability affects PyTorch version 2.6.0. Users are advised to upgrade to version 2.8.0 or later.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

While there are no specific workarounds, it is crucial to plan for an upgrade to mitigate the risks associated with this vulnerability.

The CVSS score of this vulnerability is 3.3, indicating a moderate level of severity.

Related vulnerabilities

Recent vulnerabilities recorded for torch.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Latest published version: 2.14.1 as of 22 Oct 2026

pip install --upgrade "torch==2.14.1"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.8.0

This is the first release that contains the fix.

pip install --upgrade "torch==2.8.0"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback