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

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

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.

Technologies: torch (PyPI). Vendors: PyPI.

Quick answers

Is CVE-2025-2148 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2025-2148 being exploited in the wild.
How severe is CVE-2025-2148?
Medium severity, with a CVSS score of 5, published 10 March 2025.
Which products and versions are affected?
torch (PyPI) <= 2.6.0, ECOSYSTEM:introduced=0,last_affected=2.6.0, ECOSYSTEM:introduced=0,last_affected=2.6.0-cu124.
Is there a fix for CVE-2025-2148?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2025-2148 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2025-2148?
Check whether you run torch (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

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

Identifiers

  • CVE-2025-2148
  • GHSA-c678-jfcj-6jmf
  • PYSEC-2025-189

Timeline

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

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.