CVE-2025-55560: PyTorch: DoS via sparse/dense tensor Inductor compile

HIGH PoC AVAILABLE
Published September 25, 2025
CISO Take

PyTorch v2.7.0 models using sparse-to-dense tensor conversions will crash inference services when compiled with Inductor (torch.compile()). An attacker who can influence model architecture or submit crafted models to a compilation endpoint can take down your ML serving infrastructure with no authentication required. Disable Inductor compilation for untrusted models immediately and track the fix in PR #151897.

Risk Assessment

High risk for organizations exposing PyTorch model compilation or inference endpoints to untrusted inputs. CVSS 7.5 with network vector, low complexity, and no privileges required makes this trivially exploitable once a target is identified. Blast radius is limited to availability — no data exfiltration risk — but ML serving outages in production pipelines can cascade to business-critical systems. Risk is elevated for MLaaS platforms, model-as-a-service APIs, and CI/CD pipelines that automatically compile submitted models.

Affected Systems

Package Ecosystem Vulnerable Range Patched
pytorch pip No patch
99.6K OpenSSF 6.4 21.7K dependents Pushed 6d ago 8% patched ~142d to patch Full package profile →

Do you use pytorch? You're affected.

Severity & Risk

CVSS 3.1
7.5 / 10
EPSS
0.1%
chance of exploitation in 30 days
Higher than 31% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Moderate
Exploitation Confidence
medium
Public PoC indexed (trickest/cve)
Composite signal derived from CISA KEV, CISA SSVC, EPSS, trickest/cve, and Nuclei templates.

Attack Surface

AV AC PR UI S C I A
AV Network
AC Low
PR None
UI None
S Unchanged
C None
I None
A High

Recommended Action

6 steps
  1. IMMEDIATE

    Audit deployments for PyTorch v2.7.0 with torch.compile() enabled — inventory all services.

  2. WORKAROUND

    Disable Inductor compilation for models containing sparse tensor operations by setting backend='eager' or backend='aot_eager' until patch is available.

  3. PATCH

    Monitor pytorch/pytorch PR #151897 for merge and upgrade as soon as a fixed release ships.

  4. DETECTION

    Add model graph inspection prior to compilation to reject models with to_sparse()/to_dense() operation chains in untrusted contexts.

  5. BOUNDARY CONTROL

    If accepting external models for compilation, sandbox the compilation step with resource limits (ulimit, cgroups) and process isolation to contain the DoS impact.

  6. MONITOR

    Alert on abnormal memory/CPU spikes in model compilation workers as an indicator of exploitation attempts.

CISA SSVC Assessment

Decision Track
Exploitation none
Automatable Yes
Technical Impact partial

Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.

Classification

Compliance Impact

This CVE is relevant to:

EU AI Act
Article 9 - Risk management system for high-risk AI
ISO 42001
A.6.2.5 - AI system availability and resilience
NIST AI RMF
GOVERN 6.1 - Policies for AI risk management including third-party components MANAGE 2.2 - Mechanisms to maintain AI system integrity and availability
OWASP LLM Top 10
LLM04 - Model Denial of Service

Frequently Asked Questions

What is CVE-2025-55560?

PyTorch v2.7.0 models using sparse-to-dense tensor conversions will crash inference services when compiled with Inductor (torch.compile()). An attacker who can influence model architecture or submit crafted models to a compilation endpoint can take down your ML serving infrastructure with no authentication required. Disable Inductor compilation for untrusted models immediately and track the fix in PR #151897.

Is CVE-2025-55560 actively exploited?

Proof-of-concept exploit code is publicly available for CVE-2025-55560, increasing the risk of exploitation.

How to fix CVE-2025-55560?

1. IMMEDIATE: Audit deployments for PyTorch v2.7.0 with torch.compile() enabled — inventory all services. 2. WORKAROUND: Disable Inductor compilation for models containing sparse tensor operations by setting backend='eager' or backend='aot_eager' until patch is available. 3. PATCH: Monitor pytorch/pytorch PR #151897 for merge and upgrade as soon as a fixed release ships. 4. DETECTION: Add model graph inspection prior to compilation to reject models with to_sparse()/to_dense() operation chains in untrusted contexts. 5. BOUNDARY CONTROL: If accepting external models for compilation, sandbox the compilation step with resource limits (ulimit, cgroups) and process isolation to contain the DoS impact. 6. MONITOR: Alert on abnormal memory/CPU spikes in model compilation workers as an indicator of exploitation attempts.

What systems are affected by CVE-2025-55560?

This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, inference optimization, MLaaS platforms, automated model evaluation.

What is the CVSS score for CVE-2025-55560?

CVE-2025-55560 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 0.12%.

Technical Details

NVD Description

An issue in pytorch v2.7.0 can lead to a Denial of Service (DoS) when a PyTorch model consists of torch.Tensor.to_sparse() and torch.Tensor.to_dense() and is compiled by Inductor.

Exploitation Scenario

An adversary targeting a company's public-facing model evaluation API (e.g., a platform that accepts user-uploaded PyTorch models for benchmarking) crafts a minimal model that chains torch.Tensor.to_sparse() and torch.Tensor.to_dense() operations. They submit the model via the API. The backend service automatically calls torch.compile() with the default Inductor backend, triggering uncontrolled resource consumption that crashes the worker process. By submitting multiple crafted models in rapid succession, the adversary sustains a denial of service, taking down the inference cluster. No credentials or prior access required — only knowledge of the PyTorch API, which is publicly documented.

Weaknesses (CWE)

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Timeline

Published
September 25, 2025
Last Modified
October 14, 2025
First Seen
September 25, 2025

Related Vulnerabilities