CVE-2025-55551: PyTorch: DoS in linalg.lu via malformed slice op
HIGH CISA: TRACK*Any PyTorch-based inference service exposed to untrusted input is at risk of remote crash with no authentication required. If your ML serving infrastructure uses torch.linalg.lu (common in scientific and financial ML pipelines), treat this as an urgent patching item. Until v2.8.0 is patched, firewall PyTorch endpoints from public access or add input shape validation at the API layer.
What is the risk?
HIGH operational risk for organizations running PyTorch in production serving roles. CVSS 7.5 is backed by AV:N/AC:L/PR:N/UI:N — an unauthenticated remote attacker with network reach to a PyTorch-backed service can crash it with a single crafted request. No exploit complexity, no foothold required. PoC exists publicly (GitHub gist referenced in NVD). Not in CISA KEV yet, but the low barrier to exploitation means weaponization is trivial.
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| PyTorch | pip | — | No patch |
Do you use PyTorch? You're affected.
How severe is it?
What is the attack surface?
What should I do?
5 steps-
PATCH
Pin PyTorch to a version prior to 2.8.0 or await official patch — no patched version is confirmed yet; monitor https://github.com/pytorch/pytorch/issues/151401 for resolution.
-
WORKAROUND
Add input validation before any torch.linalg.lu call — validate tensor shape, dtype, and dimension constraints at the API boundary.
-
NETWORK
Restrict PyTorch inference endpoints to authenticated, internal traffic only; block public exposure of linalg-capable endpoints.
-
DETECT
Monitor for abnormal process termination or OOM events on model serving nodes; alert on repeated 5xx errors from inference endpoints.
-
ISOLATE
Run inference workloads in containerized environments with resource limits (memory/CPU cgroups) to contain blast radius of DoS.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2025-55551?
Any PyTorch-based inference service exposed to untrusted input is at risk of remote crash with no authentication required. If your ML serving infrastructure uses torch.linalg.lu (common in scientific and financial ML pipelines), treat this as an urgent patching item. Until v2.8.0 is patched, firewall PyTorch endpoints from public access or add input shape validation at the API layer.
Is CVE-2025-55551 actively exploited?
No confirmed active exploitation of CVE-2025-55551 has been reported, but organizations should still patch proactively.
How to fix CVE-2025-55551?
1. PATCH: Pin PyTorch to a version prior to 2.8.0 or await official patch — no patched version is confirmed yet; monitor https://github.com/pytorch/pytorch/issues/151401 for resolution. 2. WORKAROUND: Add input validation before any torch.linalg.lu call — validate tensor shape, dtype, and dimension constraints at the API boundary. 3. NETWORK: Restrict PyTorch inference endpoints to authenticated, internal traffic only; block public exposure of linalg-capable endpoints. 4. DETECT: Monitor for abnormal process termination or OOM events on model serving nodes; alert on repeated 5xx errors from inference endpoints. 5. ISOLATE: Run inference workloads in containerized environments with resource limits (memory/CPU cgroups) to contain blast radius of DoS.
What systems are affected by CVE-2025-55551?
This vulnerability affects the following AI/ML architecture patterns: model serving, inference APIs, training pipelines, ML platform (multi-tenant), scientific/numerical ML workloads.
What is the CVSS score for CVE-2025-55551?
CVE-2025-55551 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 0.39%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.001 AI Software AML.T0029 Denial of AI Service AML.T0034 Cost Harvesting AML.T0049 Exploit Public-Facing Application Compliance Controls Affected
What are the technical details?
Original Advisory
An issue in the component torch.linalg.lu of pytorch v2.8.0 allows attackers to cause a Denial of Service (DoS) when performing a slice operation.
Exploitation Scenario
Adversary identifies an exposed ML inference API (e.g., TorchServe or a FastAPI endpoint) that accepts matrix inputs for a scientific or financial ML model. They review the public PoC gist, craft a minimal HTTP POST with a tensor designed to trigger the malformed slice operation in torch.linalg.lu, and send it. The PyTorch worker crashes or hangs, taking down the inference service. Repeated requests prevent recovery. In a multi-tenant ML platform, this could deny service to all tenants sharing the PyTorch backend.
Weaknesses (CWE)
CWE-400 — Uncontrolled Resource Consumption: The product does not properly control the allocation and maintenance of a limited resource.
- [Architecture and Design] Design throttling mechanisms into the system architecture. The best protection is to limit the amount of resources that an unauthorized user can cause to be expended. A strong authentication and access control model will help prevent such attacks from occurring in the first place. The login application should be protected against DoS attacks as much as possible. Limiting the database access, perhaps by caching result sets, can help minimize the resources expended. To further limit the potential for a DoS attack, consider tracking the rate of requests received from users and blocking requests that exceed a defined rate threshold.
- [Architecture and Design] Mitigation of resource exhaustion attacks requires that the target system either: The first of these solutions is an issue in itself though, since it may allow attackers to prevent the use of the system by a particular valid user. If the attacker impersonates the valid user, they may be able to prevent the user from accessing the server in question. The second solution is simply difficult to effectively institute -- and even when properly done, it does not provide a full solution. It simply makes the attack require more resources on the part of the attacker. recognizes the attack and denies that user further access for a given amount of time, or uniformly throttles all requests in order to make it more difficult to consume resources more quickly than they can again be freed.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H References
Timeline
Related Vulnerabilities
CVE-2024-5452 9.8 pytorch-lightning: RCE via deepdiff Delta deserialization
Same package: torch CVE-2023-43654 9.8 TorchServe: SSRF + RCE via unrestricted model URL loading
Same package: torch CVE-2022-45907 9.8 PyTorch: RCE via unsafe eval in JIT annotations
Same package: torch CVE-2022-0845 9.8 pytorch-lightning: code injection enables full RCE
Same package: torch CVE-2024-35198 9.8 TorchServe: URL bypass enables arbitrary model loading
Same package: torch