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-2024-5980

CVE-2024-5980: PyTorch Lightning Path Traversal Flaw

CVE-2024-5980 is a path traversal vulnerability in PyTorch Lightning's /v1/runs API endpoint that allows attackers to write arbitrary files via malicious tar.gz plugins. This article covers technical details, affected versions, and mitigation.

Published: April 8, 2026

CVE-2024-5980 Overview

A path traversal vulnerability exists in the /v1/runs API endpoint of lightning-ai/pytorch-lightning v2.2.4 that allows attackers to exploit arbitrary file write capabilities when extracting tar.gz files. When the LightningApp is running with the plugin_server, attackers can deploy malicious tar.gz plugins that embed arbitrary files with path traversal vulnerabilities. This can result in arbitrary files being written to any directory in the victim's local file system, potentially leading to remote code execution.

Critical Impact

Attackers can achieve remote code execution by writing malicious files to arbitrary locations on the target system through crafted tar.gz plugin archives, compromising the entire host machine.

Affected Products

  • lightningai pytorch_lightning v2.2.4 and earlier versions
  • LightningApp deployments running with plugin_server enabled
  • Python environments with vulnerable pytorch-lightning packages installed

Discovery Timeline

  • 2024-06-27 - CVE CVE-2024-5980 published to NVD
  • 2025-10-15 - Last updated in NVD database

Technical Details for CVE-2024-5980

Vulnerability Analysis

This vulnerability stems from improper handling of file paths during tar.gz archive extraction in the /v1/runs API endpoint. The plugin server functionality in PyTorch Lightning allows users to deploy plugins packaged as tar.gz archives. However, the extraction routine fails to properly sanitize file paths within the archive, allowing specially crafted archives to include files with directory traversal sequences (e.g., ../../../etc/cron.d/malicious).

When such a malicious archive is processed, the extraction operation follows the embedded path traversal sequences literally, writing files outside the intended plugin directory. This allows an attacker to place executable files, configuration overrides, or malicious scripts in sensitive system locations. The vulnerability is classified under CWE-22 (Improper Limitation of a Pathname to a Restricted Directory).

Root Cause

The root cause is insufficient validation and sanitization of file paths contained within tar.gz archives before extraction. The vulnerable code does not verify that extracted file destinations remain within the designated plugin directory, allowing relative path components like ../ to escape the intended extraction boundary.

Attack Vector

The attack can be executed remotely over the network without authentication. An attacker crafts a malicious tar.gz archive containing files with path traversal sequences in their filenames. When this archive is submitted to the /v1/runs API endpoint of a LightningApp instance running with the plugin_server enabled, the extraction process writes the embedded files to attacker-controlled locations on the filesystem.

The vulnerability mechanism involves embedding files within a tar.gz archive with specially crafted paths containing directory traversal sequences. When the archive is extracted by the vulnerable plugin server, files escape the intended extraction directory and can be written to arbitrary filesystem locations. Attackers typically target locations such as cron directories, SSH authorized_keys files, or web application directories to achieve code execution. For detailed technical information, see the Huntr Security Bounty Report.

Detection Methods for CVE-2024-5980

Indicators of Compromise

  • Unexpected files appearing in system directories such as /etc/cron.d/, /root/.ssh/, or web server directories
  • Suspicious tar.gz uploads to the /v1/runs API endpoint containing path traversal sequences
  • Log entries showing file extraction operations writing to paths outside the expected plugin directory
  • New scheduled tasks or SSH authorized keys not created by administrators

Detection Strategies

  • Monitor API access logs for requests to /v1/runs endpoint with unusual payload sizes or frequencies
  • Implement file integrity monitoring (FIM) on critical system directories to detect unauthorized modifications
  • Deploy network intrusion detection rules to identify tar.gz uploads containing path traversal patterns
  • Audit plugin server logs for extraction operations targeting unexpected filesystem paths

Monitoring Recommendations

  • Enable verbose logging for the LightningApp plugin_server component
  • Set up alerts for file creation events in sensitive directories like /etc/, /root/, and application binary paths
  • Monitor system resource usage for signs of unauthorized code execution following plugin deployments
  • Implement behavioral analysis to detect anomalous file write patterns from the PyTorch Lightning process

How to Mitigate CVE-2024-5980

Immediate Actions Required

  • Upgrade pytorch-lightning to a patched version that includes commit 330af381de88cff17515418a341cbc1f9f127f9a
  • Disable the plugin_server functionality if not required for your deployment
  • Implement network-level access controls to restrict access to the /v1/runs API endpoint
  • Review filesystem permissions to ensure the LightningApp process runs with minimal privileges

Patch Information

Lightning AI has released a fix for this vulnerability. The patch is available in the GitHub commit 330af381de88cff17515418a341cbc1f9f127f9a. Users should update their pytorch-lightning installation to include this security fix. Additional details about the vulnerability and patch can be found in the Huntr Security Bounty Report.

Workarounds

  • Disable the plugin_server component by not starting LightningApp with plugin server functionality enabled
  • Deploy the application behind a reverse proxy or firewall that validates and sanitizes incoming archive uploads
  • Use containerization with read-only filesystem mounts to limit the impact of arbitrary file writes
  • Implement application-level access controls requiring authentication for the /v1/runs endpoint
bash
# Example: Restrict plugin_server access via firewall rules
# Block external access to the vulnerable API endpoint
iptables -A INPUT -p tcp --dport 8080 -s ! 127.0.0.1 -j DROP

# Alternative: Run with minimal filesystem permissions
# Create dedicated user with restricted write access
useradd -r -s /bin/false lightning-app
chown -R lightning-app:lightning-app /opt/lightning-app
chmod 755 /opt/lightning-app

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

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechPytorch Lightning

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability10.73%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-22
  • Technical References
  • GitHub Commit Update

  • Huntr Security Bounty
  • Related CVEs
  • CVE-2024-5452: PyTorch Lightning RCE Vulnerability

  • CVE-2024-8019: PyTorch Lightning RCE 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