A Leader in the 2025 Gartner® Magic Quadrant™ for Endpoint Protection Platforms. Five years running.A Leader in the Gartner® Magic Quadrant™Read the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI Security Portfolio
      Leading the Way in AI-Powered Security Solutions
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      Digital Forensics, IRR & Breach Readiness
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2025-3730

CVE-2025-3730: PyTorch CTC Loss DOS Vulnerability

CVE-2025-3730 is a denial of service vulnerability in PyTorch 2.6.0 affecting the torch.nn.functional.ctc_loss function. This flaw requires local access and can disrupt operations. This article covers technical details.

Updated: January 22, 2026

CVE-2025-3730 Overview

A denial of service vulnerability has been identified in PyTorch 2.6.0 affecting the torch.nn.functional.ctc_loss function located in the file aten/src/ATen/native/LossCTC.cpp. The vulnerability allows an attacker with local access to cause a denial of service condition through manipulation of the function's input parameters. The exploit has been publicly disclosed, though the real existence of this vulnerability is still under investigation. A patch has been made available to address the issue.

Critical Impact

Local attackers can cause denial of service conditions in PyTorch machine learning applications by exploiting improper input validation in the CTC loss function, potentially disrupting model training and inference pipelines.

Affected Products

  • PyTorch 2.6.0 (Python package)
  • Linux Foundation PyTorch distributions
  • Applications using torch.nn.functional.ctc_loss function

Discovery Timeline

  • April 16, 2025 - CVE-2025-3730 published to NVD
  • May 28, 2025 - Last updated in NVD database

Technical Details for CVE-2025-3730

Vulnerability Analysis

This vulnerability exists in PyTorch's Connectionist Temporal Classification (CTC) loss implementation, a function commonly used in speech recognition and handwriting recognition neural networks. The affected function torch.nn.functional.ctc_loss fails to properly validate the log_probs tensor parameter before processing, allowing an attacker to pass an empty tensor that causes the application to crash or behave unexpectedly.

The vulnerability requires local access to exploit, meaning an attacker must be able to execute code on the target system or supply malicious input through an application that uses the vulnerable function. This is particularly concerning in environments where untrusted machine learning models are loaded and executed, as the PyTorch security policy specifically warns against using unknown models that might establish malicious effects.

Root Cause

The root cause is classified under CWE-404: Improper Resource Shutdown or Release, though more specifically, the issue stems from missing input validation on the log_probs tensor parameter. The CTC loss function did not verify that the input tensor contains valid data (i.e., numel() > 0) before proceeding with computations, leading to potential crashes or undefined behavior when processing empty tensors.

Attack Vector

The attack requires local access to the system running PyTorch. An attacker can exploit this vulnerability by:

  1. Crafting a malicious PyTorch model or script that calls torch.nn.functional.ctc_loss with an empty log_probs tensor
  2. Loading an untrusted model that contains code triggering this vulnerability
  3. Providing malformed input data that results in empty tensors being passed to the CTC loss function

The vulnerability affects both CPU and CUDA (GPU) implementations of the CTC loss function.

cpp
// Security patch for CPU implementation - aten/src/ATen/native/LossCTC.cpp
// Source: https://github.com/timocafe/tewart-pytorch/commit/46fc5d8e360127361211cb237d5f9eef0223e567

 // the alphas from the user by only returning the loss.
 template<typename scalar_t, ScalarType target_scalar_type>
 std::tuple<Tensor, Tensor> ctc_loss_cpu_template(const Tensor& log_probs, const Tensor& targets, IntArrayRef input_lengths, IntArrayRef target_lengths, int64_t BLANK) {
+  TORCH_CHECK(log_probs.numel() > 0, "log_probs tensor must not be empty");
   // log_probs: input_len x batch_size x num_labels
   // targets [int64]: batch_size x target_length OR sum(target_lengths)
   constexpr scalar_t neginf = -std::numeric_limits<scalar_t>::infinity();

Detection Methods for CVE-2025-3730

Indicators of Compromise

  • Unexpected application crashes in PyTorch-based services with stack traces referencing ctc_loss or LossCTC.cpp
  • Error logs indicating tensor-related exceptions during model training or inference
  • Unusual resource consumption patterns in ML pipelines using CTC loss functions

Detection Strategies

  • Monitor PyTorch application logs for crashes involving the torch.nn.functional.ctc_loss function
  • Implement input validation checks in application code before calling CTC loss functions
  • Use static analysis tools to identify code paths that may pass unchecked tensors to vulnerable functions
  • Deploy runtime monitoring for PyTorch applications to detect abnormal terminations

Monitoring Recommendations

  • Enable verbose logging for PyTorch applications in production environments
  • Set up alerting for repeated crashes in ML inference services
  • Monitor for attempts to load untrusted or unverified PyTorch models
  • Track resource utilization patterns that may indicate denial of service attempts

How to Mitigate CVE-2025-3730

Immediate Actions Required

  • Apply the security patch with commit hash 46fc5d8e360127361211cb237d5f9eef0223e567
  • Validate all input tensors before passing them to torch.nn.functional.ctc_loss
  • Review and restrict the loading of untrusted PyTorch models
  • Implement input validation wrappers around CTC loss function calls

Patch Information

A patch is available for this vulnerability. The fix adds proper input validation to check that the log_probs tensor is not empty before processing. The patch has been applied to both the CPU implementation (aten/src/ATen/native/LossCTC.cpp) and the CUDA implementation (aten/src/ATen/native/cuda/LossCTC.cu).

Relevant resources:

  • GitHub Issue Discussion
  • GitHub Pull Request #150981
  • Security Patch Commit

Workarounds

  • Add explicit validation in application code to ensure tensors passed to ctc_loss are non-empty
  • Follow PyTorch security policy recommendations by avoiding the use of unknown or untrusted models
  • Implement sandboxing or isolation for environments that execute untrusted ML models
  • Consider using containerization to limit the blast radius of potential DoS attacks
python
# Input validation wrapper example
import torch

def safe_ctc_loss(log_probs, targets, input_lengths, target_lengths, blank=0):
    # Validate log_probs tensor is not empty before calling ctc_loss
    if log_probs.numel() == 0:
        raise ValueError("log_probs tensor must not be empty")
    
    return torch.nn.functional.ctc_loss(
        log_probs, targets, input_lengths, target_lengths, blank=blank
    )

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechPytorch

  • SeverityMEDIUM

  • CVSS Score4.8

  • EPSS Probability0.06%

  • Known ExploitedNo
  • CVSS Vector
  • 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:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-404
  • Technical References
  • VulDB CTI ID #305076

  • VulDB #305076

  • VulDB Submission #553645
  • Vendor Resources
  • GitHub Issue Discussion

  • GitHub Issue Comment

  • GitHub Pull Request

  • GitHub Commit Reference
  • Related CVEs
  • CVE-2024-31580: PyTorch Heap Buffer Overflow DoS Flaw

  • CVE-2025-4287: PyTorch NCCL DoS Vulnerability

  • CVE-2025-2953: PyTorch Denial of Service Vulnerability

  • CVE-2026-24747: PyTorch weights_only RCE Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • English
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use