CVE-2025-2148 Overview
A memory corruption vulnerability has been identified in PyTorch version 2.6.0+cu124 affecting the torch.ops.profiler._call_end_callbacks_on_jit_fut function within the Tuple Handler component. This vulnerability allows remote attackers to potentially corrupt memory through manipulation of None arguments, although exploitation complexity is high and requires user interaction.
Critical Impact
Successful exploitation of this memory corruption vulnerability could lead to system instability, data corruption, or potentially allow further exploitation of the affected PyTorch installation.
Affected Products
- PyTorch 2.6.0+cu124
Discovery Timeline
- 2025-03-10 - CVE CVE-2025-2148 published to NVD
- 2025-06-23 - Last updated in NVD database
Technical Details for CVE-2025-2148
Vulnerability Analysis
This vulnerability exists within PyTorch's profiler functionality, specifically in the torch.ops.profiler._call_end_callbacks_on_jit_fut function. The Tuple Handler component fails to properly validate or handle None arguments, leading to memory corruption conditions (CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer).
The attack vector is network-based, meaning it can be triggered remotely. However, the exploitation difficulty is considered high due to attack complexity requirements and the need for user interaction. When exploited, the vulnerability can affect the confidentiality, integrity, and availability of the system, though impacts are limited in scope.
Root Cause
The root cause stems from improper memory buffer operations within the Tuple Handler component. When the _call_end_callbacks_on_jit_fut function receives a None argument during callback processing, the system does not properly validate this input before performing memory operations, resulting in potential out-of-bounds memory access or corruption.
Attack Vector
The vulnerability can be exploited remotely through network-accessible interfaces that utilize the affected PyTorch profiler functionality. An attacker would need to craft a malicious input that causes the vulnerable function to process a None argument in a context where memory corruption occurs.
The attack requires user interaction and involves high attack complexity, making practical exploitation challenging. The attacker does not need prior authentication or privileges to attempt exploitation.
The vulnerable function is torch.ops.profiler._call_end_callbacks_on_jit_fut within PyTorch's profiler subsystem. When called with improperly handled None values in the Tuple Handler context, memory boundaries may not be respected, leading to corruption. For detailed technical analysis, refer to GitHub Issue #147722.
Detection Methods for CVE-2025-2148
Indicators of Compromise
- Unexpected crashes or segmentation faults in PyTorch applications utilizing the profiler
- Abnormal memory consumption patterns in processes running torch.ops.profiler functions
- Application logs showing errors related to _call_end_callbacks_on_jit_fut or Tuple Handler operations
Detection Strategies
- Monitor PyTorch applications for unexpected crashes or memory-related errors in profiler operations
- Implement application-level logging to capture calls to torch.ops.profiler._call_end_callbacks_on_jit_fut
- Deploy runtime application self-protection (RASP) tools to detect memory corruption attempts
Monitoring Recommendations
- Enable verbose logging for PyTorch profiler operations in production environments
- Monitor system memory usage for anomalies when PyTorch applications are running
- Implement crash reporting and analysis for applications using affected PyTorch versions
How to Mitigate CVE-2025-2148
Immediate Actions Required
- Audit your environment for installations of PyTorch version 2.6.0+cu124
- Review code paths that utilize torch.ops.profiler._call_end_callbacks_on_jit_fut functionality
- Consider disabling or restricting profiler functionality in production environments until patched
- Monitor GitHub Issue #147722 for updates from the PyTorch team
Patch Information
No official patch information has been released at the time of this writing. Users should monitor the official PyTorch GitHub repository and security advisories for patch releases. Track updates through GitHub Issue #147722 and VulDB #299059 for the latest remediation guidance.
Workarounds
- Avoid using the torch.ops.profiler._call_end_callbacks_on_jit_fut function in untrusted contexts
- Implement input validation in application code before passing arguments to affected profiler functions
- Consider running PyTorch applications in sandboxed or isolated environments to limit potential impact
- Disable profiler functionality entirely if not required for production workloads
# Check installed PyTorch version
pip show torch | grep Version
# If version 2.6.0+cu124, consider downgrading to a previous stable version
# pip install torch==<previous_stable_version>
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

