CVE-2025-63397
Executive Summary
CVE-2025-63397 is a vulnerability in OneFlow v0.9.0, an open-source deep learning framework. The flaw stems from improper input validation during broadcasting and type conversion operations when a Python sequence is added to native code. This can be exploited by an attacker to cause a segmentation fault, leading to a denial of service (DoS) condition. The vulnerability has a CVSS score of 0.0, indicating no official severity rating has been assigned, but the potential for disruption is significant in environments where OneFlow is used for model training or inference. No public proof-of-concept (PoC) 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 PyPI package (oneflow). This vulnerability affects the Python package ecosystem. Users should verify the integrity of their installed package and monitor for updates from the vendor. The lack of a patch increases supply chain risk for any system relying on this library.
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (Unassigned)
- Attack Vector (AV): Local (L) – Requires local access to the system.
- Attack Complexity (AC): Low (L) – The exploit is straightforward.
- Privileges Required (PR): None (N) – No special privileges needed.
- User Interaction (UI): Required (R) – The user must execute the malicious code.
- Scope (S): Unchanged (U) – The vulnerability does not affect other components.
- Confidentiality (C): None (N) – No data exposure.
- Integrity (I): None (N) – No data modification.
- Availability (A): High (H) – The segmentation fault causes a denial of service.
Threat Level: Medium (due to DoS potential and lack of patch).
Deep Dive & Mechanics
The vulnerability is in OneFlow's native code, specifically in the broadcasting and type conversion logic. When a Python sequence (e.g., a list or tuple) is passed to a function that expects a tensor, the framework attempts to convert it. Due to improper input validation, the conversion process can access invalid memory, causing a segmentation fault.
Root Cause: The native code does not properly check the bounds or type of the input sequence before performing operations. This leads to an out-of-bounds read or write, crashing the process.
Attack Vector: An attacker can craft a Python script that imports OneFlow and passes a malicious sequence to a function that triggers broadcasting or type conversion. For example, passing a list with an unexpected shape or data type.
Impact: Successful exploitation results in a segmentation fault, terminating the application. This can be used to disrupt services that rely on OneFlow for machine learning tasks.
Vulnerable vs. Patched Code
Vulnerable Code (OneFlow v0.9.0):
import oneflow as flow
# This triggers the vulnerability
tensor = flow.tensor([1, 2, 3])
result = tensor + [4, 5, 6] # Broadcasting with a Python list
Patched Code (Hypothetical):
import oneflow as flow
# Proper input validation would prevent the crash
tensor = flow.tensor([1, 2, 3])
# The framework should convert the list to a tensor safely
result = tensor + flow.tensor([4, 5, 6])
The patched version would include checks to ensure that any Python sequence is safely converted to a tensor before performing operations, preventing the segmentation fault.
Exploitation & Lab Setup
Red Team (Exploitation)
Lab Setup:
- Install OneFlow v0.9.0:
pip install oneflow==0.9.0 - Create a Python script
exploit.py:
import oneflow as flow
# Trigger the vulnerability
tensor = flow.tensor([1, 2, 3])
# This will cause a segmentation fault
result = tensor + [4, 5, 6]
print(result)
- Run the script:
python exploit.py
Expected Outcome: The script will crash with a segmentation fault.
Blue Team (Detection & Prevention)
Detection:
- Monitor for crashes in OneFlow processes.
- Use system logs to detect segmentation faults (e.g.,
dmesgon Linux). - Implement application-level monitoring for unexpected terminations.
Prevention:
- Avoid using Python sequences directly in OneFlow operations. Always convert to tensors first.
- Apply input validation at the application layer.
- Use a Web Application Firewall (WAF) or runtime protection if OneFlow is exposed via an API.
Indicators of Compromise (IOCs)
- Process Crash: Segmentation fault in
oneflowprocess. - Log Entry:
Segmentation fault (core dumped)in system logs. - File: Core dump file (e.g.,
core.1234) in the working directory. - Network: No network IOCs, as this is a local DoS.
Detection Engineering
YARA Rule
rule CVE_2025_63397_OneFlow_Segfault {
meta:
description = "Detects OneFlow v0.9.0 vulnerability exploitation attempts"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-63397"
strings:
$s1 = "oneflow" ascii wide nocase
$s2 = "broadcasting" ascii wide nocase
$s3 = "type conversion" ascii wide nocase
condition:
all of them
}
Sigma Rule
title: OneFlow Segmentation Fault Exploitation
id: 8f4b3c2a-1d5e-4f7b-9a0c-3e6d8f2b1a4c
status: experimental
description: Detects attempts to exploit CVE-2025-63397 in OneFlow v0.9.0
author: Valters IT
date: 2025-04-10
logsource:
category: process_creation
product: linux
detection:
selection:
Image|endswith: '/python3'
CommandLine|contains: 'oneflow'
condition: selection
falsepositives:
- Legitimate use of OneFlow
level: medium
Suricata Rule
alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-63397 OneFlow Segmentation Fault Attempt"; flow:to_server; content:"oneflow"; nocase; classtype:attempted-dos; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate: If OneFlow v0.9.0 is in use, isolate the affected systems from critical networks.
- Monitor: Enable detailed logging and monitoring for segmentation faults.
- Workaround: Avoid using Python sequences directly in OneFlow operations. Always convert to tensors using
flow.tensor().
Long-Term Fix:
- Patch: Await an official patch from the vendor. Check the OneFlow GitHub repository for updates.
- Upgrade: Once a patched version is released, upgrade to the latest version.
- Alternative: Consider switching to a different deep learning framework (e.g., PyTorch, TensorFlow) if the vulnerability is critical.
Valters IT Signature: This report was generated by Valters IT DevSecOps Intelligence.