Junglewise Threat Intelligence

CVE-2025-3001: PyTorch memory corruption in torch.lstm_cell

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

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

Executive brief

PyTorch, a popular machine learning library, contains a vulnerability in its LSTM (Long Short-Term Memory) cell processing function. An attacker with local access to a system could provide specially crafted inputs to this function to cause the application to crash or corrupt its memory. This could lead to service disruptions or potentially allow for unauthorized access to sensitive information handled by the machine learning model.

Technical details

A memory corruption vulnerability (CWE-119) exists in PyTorch's 'torch.lstm_cell' function. The issue is triggered when the function processes specific tensor configurations, such as empty tensors or specific weight values, leading to a segmentation fault or improper restriction of operations within the bounds of a memory buffer. An attacker with local execution privileges can exploit this by passing malicious inputs to the affected function. This can result in a denial-of-service (crash) or potentially arbitrary code execution depending on the memory environment. The vulnerability was identified in version 2.6.0 and is addressed in version 2.10.0 via commit 999d94b.

Affected products

  • PyTorch PyTorch < 2.10.0

Timeline

  • 2025-03-20: disclosed: Issue reported on GitHub repository
  • 2025-03-31: advisory: GitHub and NVD advisories published
  • 2026-06-10: other: Advisory reviewed and updated

References

Related threats