Junglewise Threat Intelligence

CVE-2025-2148: PyTorch memory corruption in profiler Tuple Handler

CVE-2025-2148 · Severity: medium · CVSS 5 · Published 2025-03-10

Technologies: torch (PyPI), PyTorch. Vendors: PyPI, PyTorch.

Executive brief

PyTorch, a popular machine learning framework, is vulnerable to a memory corruption issue when processing specific inputs in its profiling component. An attacker could potentially cause the application to crash or behave unpredictably by providing a malformed 'None' argument to a specific internal function. This could lead to service disruptions or impact the reliability of machine learning operations.

Technical details

A memory corruption vulnerability (CWE-119) exists in PyTorch versions up to and including 2.6.0. The flaw is located within the 'Tuple Handler' component, specifically in the torch.ops.profiler._call_end_callbacks_on_jit_fut function. When this function is invoked with a 'None' argument instead of the expected tuple, it triggers a segmentation fault due to improper handling of the null/None value. While the attack vector is listed as network-reachable, exploitation is considered difficult and requires high attack complexity, typically involving a user interacting with a malicious script or input that triggers the vulnerable profiler operation. Successful exploitation results in a crash (denial of service) and potentially limited memory corruption.

Affected products

  • PyTorch PyTorch <= 2.6.0

Timeline

  • 2025-02-24: disclosed: Issue reported on GitHub repository
  • 2025-03-10: advisory: GitHub Advisory and NVD entry published

References

Related threats