Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2025-2999

CVE-2025-2999: PyTorch Buffer Overflow Vulnerability

CVE-2025-2999 is a critical buffer overflow vulnerability in PyTorch 2.6.0 affecting the torch.nn.utils.rnn.unpack_sequence function. This memory corruption flaw requires local access but has a public exploit available.

Updated: January 22, 2026

CVE-2025-2999 Overview

A critical memory corruption vulnerability has been identified in PyTorch version 2.6.0 affecting the torch.nn.utils.rnn.unpack_sequence function. This vulnerability allows local attackers to manipulate inputs in a way that corrupts memory, potentially leading to application crashes, data corruption, or further exploitation scenarios. The exploit has been publicly disclosed, increasing the urgency for affected organizations to address this security issue.

Critical Impact

Local attackers can exploit the torch.nn.utils.rnn.unpack_sequence function to cause memory corruption, potentially compromising the integrity and availability of machine learning workloads running on affected PyTorch installations.

Affected Products

  • PyTorch 2.6.0 (Python package)
  • Linux Foundation PyTorch implementations using the affected RNN utility functions
  • Machine learning pipelines and applications leveraging torch.nn.utils.rnn.unpack_sequence

Discovery Timeline

  • 2025-03-31 - CVE-2025-2999 published to NVD
  • 2025-05-29 - Last updated in NVD database

Technical Details for CVE-2025-2999

Vulnerability Analysis

This vulnerability is classified as CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer). The torch.nn.utils.rnn.unpack_sequence function is designed to reverse the packing operation performed by pack_sequence, converting packed sequence data back into a list of tensors. However, the implementation contains a flaw in how it handles memory operations during this unpacking process.

The vulnerability requires local access to exploit, meaning an attacker must have the ability to execute code on the target system or influence the inputs processed by the vulnerable function. When exploited, the memory corruption can affect the confidentiality, integrity, and availability of the affected system, though the impact scope is limited to the local context.

Root Cause

The root cause lies in improper bounds checking or memory management within the torch.nn.utils.rnn.unpack_sequence function. When processing specially crafted or malformed packed sequence data, the function fails to properly validate memory boundaries, leading to memory corruption conditions that fall under CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer).

Attack Vector

The attack vector is local, requiring an attacker to have the ability to supply malicious input to the vulnerable PyTorch function. This could occur in scenarios where:

  • An attacker has local access to a machine learning server or workstation
  • A machine learning pipeline processes untrusted input data that reaches the vulnerable function
  • Shared computing environments where multiple users can execute PyTorch code

The vulnerability can be triggered through manipulation of the inputs passed to torch.nn.utils.rnn.unpack_sequence, causing the function to perform improper memory operations. Technical details and discussion can be found in the PyTorch GitHub Issue #149622.

Detection Methods for CVE-2025-2999

Indicators of Compromise

  • Unexpected application crashes or segmentation faults in processes using PyTorch RNN utilities
  • Memory access violation errors in logs related to torch.nn.utils.rnn.unpack_sequence operations
  • Abnormal memory consumption patterns in PyTorch-based applications
  • Core dumps indicating memory corruption in the PyTorch runtime

Detection Strategies

  • Monitor system logs for segmentation faults or memory access violations originating from PyTorch processes
  • Implement application-level logging to track calls to torch.nn.utils.rnn.unpack_sequence with input validation metrics
  • Deploy runtime application self-protection (RASP) solutions capable of detecting memory corruption attempts
  • Use memory sanitizers (AddressSanitizer, MemorySanitizer) during development and testing phases

Monitoring Recommendations

  • Configure alerting for repeated crashes in machine learning pipeline components
  • Monitor for unusual process behavior including unexpected memory allocation patterns
  • Track PyTorch version deployments across your infrastructure to identify vulnerable installations
  • Implement canary testing for production ML workloads processing external data

How to Mitigate CVE-2025-2999

Immediate Actions Required

  • Audit all deployments to identify systems running PyTorch version 2.6.0
  • Implement input validation for data processed by torch.nn.utils.rnn.unpack_sequence
  • Consider isolating vulnerable PyTorch workloads using containerization or sandboxing
  • Review and restrict local access to systems running affected PyTorch installations
  • Monitor the PyTorch GitHub repository for official patch releases

Patch Information

As of the last modification date (2025-05-29), users should monitor the official PyTorch channels for security patches. The vulnerability has been reported via GitHub Issue #149622. Organizations are advised to:

  1. Subscribe to PyTorch security announcements
  2. Upgrade to patched versions when available
  3. Review the GitHub issue for updates and community-provided mitigations

Workarounds

  • Implement strict input validation before calling torch.nn.utils.rnn.unpack_sequence to ensure data integrity
  • Use alternative sequence processing methods if available and applicable to your use case
  • Deploy the application in a restricted environment with limited privileges to reduce potential impact
  • Consider using containerized environments with memory protection features enabled
bash
# Configuration example - Verify PyTorch version in your environment
python -c "import torch; print(f'PyTorch Version: {torch.__version__}')"

# Check if the vulnerable function is used in your codebase
grep -r "unpack_sequence" --include="*.py" /path/to/your/project/

# Run with AddressSanitizer for detection during development
ASAN_OPTIONS=detect_leaks=1 python your_ml_script.py

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechPytorch

  • SeverityMEDIUM

  • CVSS Score4.8

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-119
  • Technical References
  • VulDB CTI ID #302048

  • VulDB #302048

  • VulDB Submission #524198
  • Vendor Resources
  • GitHub Issue Report

  • GitHub Issue Comment
  • Related CVEs
  • CVE-2026-4538: PyTorch Deserialization Vulnerability

  • CVE-2026-24747: PyTorch weights_only RCE Vulnerability

  • CVE-2025-55551: PyTorch torch.linalg.lu DoS Vulnerability

  • CVE-2024-35198: PyTorch TorchServe Auth Bypass Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English