{"answers":{"affected":"4 open source packages ship an affected version, including lightning and pytorch-lightning. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-5980 exists.","fix":"Upgrade lightning to 2.3.3 or later.","what":"CVE-2024-5980 is a critical path traversal vulnerability in lightning-ai/pytorch-lightning, published on 27 Jun 2024. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-5980 and fix it if it is affected.\n\nWhat it is: CVE-2024-5980 is a critical path traversal vulnerability in lightning-ai/pytorch-lightning, published on 27 Jun 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-5980 exists.\n\nAffected packages and fixed versions:\n- lightning (PyPI): affected all versions; fixed in 2.3.3\n- lightning (PyPI): affected all versions; fixed in 2.3.3\n- lightning (PyPI): affected all versions; fixed in 2.3.3\n- pytorch-lightning (PyPI): affected all versions; fixed in 2.3.3\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-5980/ (Markdown: https://insights.sbomify.com/CVE-2024-5980/index.md)","id":"CVE-2024-5980","markdown":"https://insights.sbomify.com/CVE-2024-5980/index.md","name":"CVE-2024-5980","record":{"aliases":["GHSA-mr7h-w2qc-ffc2","PYSEC-2026-386","PYSEC-2026-3975"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","data_modify"],"network_reachable":"yes","non_default_config":true,"product_category":"PyTorch Lightning library","requires_auth":"none","summary":"Attackers can write arbitrary files via path traversal in the /v1/runs API when the plugin server is active, potentially leading to remote code execution.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"@huntr_ai","cpe":[{"product":"pytorch_lightning","vendor":"lightningai"}],"cvss":{"score":9.1,"severity":"critical","source":"cna","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","version":"3.0"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"A vulnerability in the /v1/runs API endpoint of lightning-ai/pytorch-lightning v2.2.4 allows attackers to exploit path traversal 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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Arbitrary File Write via /v1/runs API endpoint in lightning-ai/pytorch-lightning","id":"CVE-2024-5980","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"path_traversal","year":"2024"},"n_packages":4,"n_references":2,"next":{"headline":"itsourcecode Online House Rental System manage_user.php sql injection","id":"CVE-2024-5981"},"packages":[{"ecosystem":"PyPI","fixed":["2.3.3"],"introduced":["0"],"last_affected":[],"package":"lightning","purl":null,"source":"GHSA-mr7h-w2qc-ffc2"},{"ecosystem":"PyPI","fixed":["2.3.3"],"introduced":["0"],"last_affected":[],"package":"lightning","purl":"pkg:pypi/lightning","source":"GHSA-mr7h-w2qc-ffc2"},{"ecosystem":"PyPI","fixed":["2.3.3"],"introduced":["0"],"last_affected":[],"package":"lightning","purl":"pkg:pypi/lightning","source":"PYSEC-2026-386"},{"ecosystem":"PyPI","fixed":["2.3.3"],"introduced":["0"],"last_affected":[],"package":"pytorch-lightning","purl":"pkg:pypi/pytorch-lightning","source":"PYSEC-2026-3975"}],"prev":{"headline":"Denial of Service via Invalid Argument in h2oai/h2o-3","id":"CVE-2024-5979"},"products":["lightning-ai/pytorch-lightning"],"published":"2024-06-27","related":[{"cvss_score":9.8,"headline":"RCE via Property/Class Pollution in lightning-ai/pytorch-lightning","id":"CVE-2024-5452","kev_date_added":null,"published":"2024-06-06"},{"cvss_score":9.3,"headline":"Compromise of PyTorch Lightning PyPi Package Versions","id":"CVE-2026-44484","kev_date_added":null,"published":"2026-05-14"},{"cvss_score":9.1,"headline":"Arbitrary File Write/Overwrite in lightning-ai/pytorch-lightning","id":"CVE-2024-8019","kev_date_added":null,"published":"2025-03-20"},{"cvss_score":8.8,"headline":"PyTorch Lightning load_from_checkpoint has an insecure checkpoint deserialization","id":"CVE-2026-31221","kev_date_added":null,"published":"2026-05-12"},{"cvss_score":8.4,"headline":"PyTorch Lightning Arbitrary Code Execution via _instantiator Hyperparameter","id":"CVE-2026-58659","kev_date_added":null,"published":"2026-07-15"},{"cvss_score":7.8,"headline":"Deserialization of Untrusted Data in pytorchlightning/pytorch-lightning","id":"CVE-2021-4118","kev_date_added":null,"published":"2021-12-23"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-10-21","vendors":["lightning-ai"]},"summary":"Attackers can write arbitrary files via path traversal in the /v1/runs API when the plugin server is active, potentially leading to remote code execution.","url":"https://insights.sbomify.com/CVE-2024-5980/"}