CVE-2025-55554: PyTorch: integer overflow in nan_to_num causes DoS
MEDIUM PoC AVAILABLECVE-2025-55554 affects PyTorch 2.8.0 with an integer overflow in torch.nan_to_num when casting to long, exploitable remotely with no authentication to crash inference services. Impact is availability-only — no data exposure or code execution. If your ML serving infrastructure runs PyTorch 2.8.0, assess exposure of inference endpoints and prioritize patching when upstream releases a fix.
Risk Assessment
Medium risk with narrow exploitability window specific to PyTorch 2.8.0. CVSS 5.3 (AV:N/AC:L/PR:N/UI:N) means it can be triggered over the network without credentials, but blast radius is limited to service availability. Not in CISA KEV. No evidence of active exploitation. Risk elevates significantly for organizations exposing PyTorch inference APIs directly to untrusted networks or user-controlled inputs that flow into numerical preprocessing stages.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| pytorch | pip | — | No patch |
Do you use pytorch? You're affected.
Severity & Risk
Attack Surface
Recommended Action
6 steps-
Inventory all deployments using PyTorch 2.8.0 and identify services exposing inference to external inputs.
-
Monitor https://github.com/pytorch/pytorch/issues/151510 for official patch release.
-
Workaround: add input validation to reject or clamp extreme numerical values before calling nan_to_num; avoid .long() conversion on untrusted float tensors without bounds checking.
-
For production serving, wrap inference calls in exception handlers to prevent process termination on overflow.
-
Consider pinning to a patched version as soon as one is released.
-
Detection: monitor inference service crash logs for unexpected termination correlated with nan_to_num stack traces.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2025-55554?
CVE-2025-55554 affects PyTorch 2.8.0 with an integer overflow in torch.nan_to_num when casting to long, exploitable remotely with no authentication to crash inference services. Impact is availability-only — no data exposure or code execution. If your ML serving infrastructure runs PyTorch 2.8.0, assess exposure of inference endpoints and prioritize patching when upstream releases a fix.
Is CVE-2025-55554 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2025-55554, increasing the risk of exploitation.
How to fix CVE-2025-55554?
1. Inventory all deployments using PyTorch 2.8.0 and identify services exposing inference to external inputs. 2. Monitor https://github.com/pytorch/pytorch/issues/151510 for official patch release. 3. Workaround: add input validation to reject or clamp extreme numerical values before calling nan_to_num; avoid .long() conversion on untrusted float tensors without bounds checking. 4. For production serving, wrap inference calls in exception handlers to prevent process termination on overflow. 5. Consider pinning to a patched version as soon as one is released. 6. Detection: monitor inference service crash logs for unexpected termination correlated with nan_to_num stack traces.
What systems are affected by CVE-2025-55554?
This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, inference APIs, data preprocessing pipelines.
What is the CVSS score for CVE-2025-55554?
CVE-2025-55554 has a CVSS v3.1 base score of 5.3 (MEDIUM). The EPSS exploitation probability is 0.06%.
Technical Details
NVD Description
pytorch v2.8.0 was discovered to contain an integer overflow in the component torch.nan_to_num-.long().
Exploitation Scenario
An adversary targets a publicly accessible ML inference API (e.g., a feature scoring or anomaly detection service) built on PyTorch 2.8.0. They craft a payload containing extreme floating-point values (NaN, +Inf, or values near INT64_MAX) in the input tensor. When the service preprocesses the input using torch.nan_to_num(...).long(), the integer overflow triggers, crashing the inference worker. In a Kubernetes or containerized deployment, the crashed pod restarts automatically, but repeated requests create a sustained DoS — effectively making the AI service unavailable without needing any authentication or special privileges. This is particularly damaging in real-time scoring pipelines (fraud detection, content moderation) where availability is SLA-critical.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L 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
AI Threat Alert