{"answers":{"affected":"3 open source packages ship an affected version, including torchserve. It affects 1 product.","exploited":"There is no known exploitation of CVE-2023-48299 in the wild and no public exploit code.","fix":"Upgrade torchserve to 0.9.0 or later.","what":"CVE-2023-48299 is a medium-severity path traversal vulnerability in pytorch serve, published on 21 Nov 2023. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-48299 and fix it if it is affected.\n\nWhat it is: CVE-2023-48299 is a medium-severity path traversal vulnerability in pytorch serve, published on 21 Nov 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2023-48299 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- torchserve (PyPI): affected from 0.1.0; fixed in 0.9.0\n- torchserve (PyPI): affected from 0.1.0; fixed in 0.9.0\n- torchserve (PyPI): affected from 0.1.0; fixed in 0.9.0\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-2023-48299/ (Markdown: https://insights.sbomify.com/CVE-2023-48299/index.md)","id":"CVE-2023-48299","markdown":"https://insights.sbomify.com/CVE-2023-48299/index.md","name":"CVE-2023-48299","record":{"aliases":["GHSA-m2mj-pr4f-h9jp","PYSEC-2026-1972"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["code_execution","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"PyTorch model server","requires_auth":"none","summary":"Attackers can upload malicious archives to TorchServe to extract files to arbitrary locations, potentially executing code or modifying data.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"torchserve","vendor":"pytorch"}],"cvss":{"score":5.3,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"TorchServe is a tool for serving and scaling PyTorch models in production. Starting in version 0.1.0 and prior to version 0.9.0, using the model/workflow management API, there is a chance of uploading potentially harmful archives that contain files that are extracted to any location on the filesystem that is within the process permissions. Leveraging this issue could aid third-party actors in hiding harmful code in open-source/public models, which can be downloaded from the internet, and take advantage of machines running Torchserve. The ZipSlip issue in TorchServe has been fixed by validating the paths of files contained within a zip archive before extracting them. TorchServe release 0.9.0 includes fixes to address the ZipSlip vulnerability.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"TorchServe ZipSlip","id":"CVE-2023-48299","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"path_traversal","year":"2023"},"n_packages":3,"n_references":4,"next":{"headline":"Embed Privacy missing escaping for show_all attribute in opt-out shortcode","id":"CVE-2023-48300"},"packages":[{"ecosystem":"PyPI","fixed":["0.9.0"],"introduced":["0.1.0"],"last_affected":[],"package":"torchserve","purl":null,"source":"GHSA-m2mj-pr4f-h9jp"},{"ecosystem":"PyPI","fixed":["0.9.0"],"introduced":["0.1.0"],"last_affected":[],"package":"torchserve","purl":"pkg:pypi/torchserve","source":"GHSA-m2mj-pr4f-h9jp"},{"ecosystem":"PyPI","fixed":["0.9.0"],"introduced":["0.1.0"],"last_affected":[],"package":"torchserve","purl":"pkg:pypi/torchserve","source":"PYSEC-2026-1972"}],"prev":{"headline":"Integer underflow leading to stack overflow in FPC codec decompression","id":"CVE-2023-48298"},"products":["serve"],"published":"2023-11-21","related":[{"cvss_score":10,"headline":"TorchServe Server-Side Request Forgery","id":"CVE-2023-43654","kev_date_added":null,"published":"2023-09-28"},{"cvss_score":9.8,"headline":"TorchServe bypass allowed_urls configuration","id":"CVE-2024-35198","kev_date_added":null,"published":"2024-07-18"},{"cvss_score":8.2,"headline":"TorchServe gRPC Port Exposure","id":"CVE-2024-35199","kev_date_added":null,"published":"2024-07-18"}],"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":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-02","vendors":["pytorch"]},"summary":"Attackers can upload malicious archives to TorchServe to extract files to arbitrary locations, potentially executing code or modifying data.","url":"https://insights.sbomify.com/CVE-2023-48299/"}