Junglewise Threat Intelligence

CVE-2025-3000: PyTorch memory corruption in torch.jit.script

CVE-2025-3000 · Severity: medium · CVSS 5.3 · Published 2025-03-31

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

Executive brief

PyTorch, a popular machine learning framework, is vulnerable to a memory corruption issue when using its TorchScript compilation feature. An attacker with local access to a system could potentially cause the application to crash or behave unpredictably by providing specific Python class definitions. This could lead to service interruptions or unauthorized access to sensitive information stored in memory.

Technical details

A memory corruption vulnerability (CWE-119) exists in PyTorch's TorchScript compiler (torch.jit.script). The issue is triggered when defining a scripted class that includes dynamic Python structures, such as a list, within the __init__ method. This leads to a segmentation fault or memory corruption at runtime. An attacker with local access and low privileges can exploit this by executing a crafted script, potentially leading to a denial of service or arbitrary code execution. The vulnerability is confirmed in version 2.6.0 and reported to affect versions up to 2.12.0. No official patch is currently listed in the advisory.

Affected products

  • PyTorch PyTorch <= 2.12.0

Timeline

  • 2025-03-20: disclosed: Issue reported on GitHub repository
  • 2025-03-31: advisory: GitHub and NVD advisories published

References

Related threats