Description Preview
A vulnerability was found in PyTorch 2.6.0 affecting the function torch.nn.utils.rnn.unpack_sequence. The flaw can lead to memory corruption when the function processes manipulated input data. Local access is required to exploit this issue, and the exploit has been disclosed publicly, meaning it may be used by attackers. The advisory lists the issue with multiple CVSS assessments, indicating a medium to high impact depending on metrics, and highlights the potential for instability or crash due to memory corruption.
Overview
This CVE describes a local memory corruption vulnerability in PyTorch 2.6.0 within the torch.nn.utils.rnn.unpack_sequence function. By feeding carefully crafted input data, an attacker with local access could trigger memory corruption, potentially causing crashes or unpredictable behavior in affected environments. The vulnerability has been publicly disclosed, and is classified with a mixed severity across CVSS metrics, underscoring the need for timely remediation in environments that rely on this PyTorch release.
Remediation
- Upgrade PyTorch to the latest patched release that fixes CVE-2025-2999. Check official PyTorch security advisories or the CVE entry for the exact fixed version and apply it across all affected systems.
- If upgrading immediately is not possible, restrict access to components using torch.nn.utils.rnn.unpack_sequence and isolate these workloads in trusted environments or containers to limit exposure to untrusted data.
- Validate and sanitize input data before it reaches the affected function, and minimize the use of the function with data from untrusted sources.
- Apply defense-in-depth measures such as containerization, least-privilege execution, and memory-protection features where feasible; consider enabling memory-safety checks (e.g., ASAN/UBSan) in development and CI pipelines to catch memory-corruption issues.
- After applying the fix, run regression and security validation tests to confirm the vulnerability is mitigated and monitor official advisories for any additional guidance or patches.
References
- VDB-302048 | PyTorch torch.nn.utils.rnn.unpack_sequence memory corruption
- VDB-302048 | CTI Indicators (IOB, IOC, IOA)
- Submit #524198 | pytorch pytorch (torch.nn.utils.rnn.unpack_sequence) torch 2.6.0 Segmentation fault
- GitHub: pytorch/pytorch/issues/149622
- GitHub: pytorch/pytorch/issues/149622#issue-2935495265
Industry ExposureMost to leastThis section illustrates the prevalence of a specific Common Vulnerabilities and Exposures (CVE) across various industries based on customer reports. The ranking displays industries from the most to least affected by this particular vulnerability, offering valuable insight into where this CVE has been most frequently observed. This information can help organizations within these sectors prioritize their security efforts, understand their relative risk exposure compared to their peers, and focus remediation strategies where they are most needed. By understanding the industry-specific impact, organizations can make more informed decisions regarding patching, resource allocation, and overall risk management related to this CVE.
This section illustrates the prevalence of a specific Common Vulnerabilities and Exposures (CVE) across various industries based on customer reports. The ranking displays industries from the most to least affected by this particular vulnerability, offering valuable insight into where this CVE has been most frequently observed. This information can help organizations within these sectors prioritize their security efforts, understand their relative risk exposure compared to their peers, and focus remediation strategies where they are most needed. By understanding the industry-specific impact, organizations can make more informed decisions regarding patching, resource allocation, and overall risk management related to this CVE.
- Finance and InsuranceFinance and Insurance: Low
- Management of Companies & EnterprisesManagement of Companies & Enterprises: Low
- ManufacturingManufacturing: Low
- Transportation & WarehousingTransportation & Warehousing: Low
- Accommodation & Food ServicesAccommodation & Food Services: Low
- Administrative, Support, Waste Management & Remediation ServicesAdministrative, Support, Waste Management & Remediation Services: Low
- Agriculture, Forestry Fishing & HuntingAgriculture, Forestry Fishing & Hunting: Low
- Arts, Entertainment & RecreationArts, Entertainment & Recreation: Low
- ConstructionConstruction: Low
- Educational ServicesEducational Services: Low
- Health Care & Social AssistanceHealth Care & Social Assistance: Low
- InformationInformation: Low
- MiningMining: Low
- Other Services (except Public Administration)Other Services (except Public Administration): Low
- Professional, Scientific, & Technical ServicesProfessional, Scientific, & Technical Services: Low
- Public AdministrationPublic Administration: Low
- Real Estate Rental & LeasingReal Estate Rental & Leasing: Low
- Retail TradeRetail Trade: Low
- UtilitiesUtilities: Low
- Wholesale TradeWholesale Trade: Low

