PyTorch is vulnerable to memory corruption through its unpack_sequence function
CVE-2025-2999 · GHSA-vgrw-7cvw-pwgx · published 2025-03-31 · updated 2026-06-10
- Severity
- Medium
- CVSS score
- 5.3
- Chance of exploitation (EPSS)
- 0.20%
- Fixed in
- 2.9.1
- Exploitation No known exploitation
- Automatable No
- Technical impact Partial
- CISA SSVC
A vulnerability was found in PyTorch 2.6.0. It has been rated as critical. Affected by this issue is the function torch.nn.utils.rnn.unpack_sequence. The manipulation leads to memory corruption. Attacking locally is a requirement. The exploit has been disclosed to the public and may be used.
Upgrade torch to 2.9.1 or later.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| torch | PyPI | < 2.9.1 | 2.9.1 |
- CriticalLiteLLM has SQL Injection in Proxy API key verificationlitellmExploited
- Criticaln8n Vulnerable to Remote Code Execution via Expression Injectionn8n, n8nExploited
- HighLiteLLM has a sandbox escape in custom-code guardraillitellmExploited
- HighLangflow affected by Remote Code Execution via validate_code() exec()langflowExploited
- CriticalJupyter MCP Server: Browser DNS rebinding can hijack the Jupyter backend through management routesjupyter-mcp-server
- Criticalmem0ai Databricks vector store vulnerable to SQL injectionmem0ai
- CriticalPyTorch: `torch.load` with `weights_only=True` leads to remote code executiontorch
- CriticalPyTorch vulnerable to arbitrary code executiontorch
- HighPyTorch Vulnerable to Remote Code Execution via Untrusted Checkpoint Filestorch
- HighPyTorch heap buffer overflow vulnerabilitytorch
- HighPytorch use-after-free vulnerabilitytorch
- MediumPyTorch Improper Resource Shutdown or Release vulnerabilitytorch
The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.