{"answers":{"affected":"3 open source packages ship an affected version, including torchserve. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-43654 exists.","fix":"Upgrade torchserve to 0.8.2 or later.","what":"CVE-2023-43654 is a critical server-side request forgery vulnerability in pytorch serve, published on 28 Sep 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-43654 and fix it if it is affected.\n\nWhat it is: CVE-2023-43654 is a critical server-side request forgery vulnerability in pytorch serve, published on 28 Sep 2023. 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-2023-43654 exists.\n\nAffected packages and fixed versions:\n- torchserve (PyPI): affected from 0.1.0; fixed in 0.8.2\n- torchserve (PyPI): affected from 0.1.0; fixed in 0.8.2\n- torchserve (PyPI): affected from 0.1.0; fixed in 0.8.2\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-43654/ (Markdown: https://insights.sbomify.com/CVE-2023-43654/index.md)","id":"CVE-2023-43654","markdown":"https://insights.sbomify.com/CVE-2023-43654/index.md","name":"CVE-2023-43654","record":{"aliases":["GHSA-8fxr-qfr9-p34w","PYSEC-2026-553"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["data_read","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"PyTorch model server","requires_auth":"none","summary":"Attackers can exploit TorchServe's default configuration to trigger remote HTTP requests and write files, compromising system integrity and sensitive data.","user_interaction":"not_required","vuln_class":"ssrf"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"torchserve","vendor":"pytorch"}],"cvss":{"score":10,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-918","name":"Server-Side Request Forgery"}],"description":"TorchServe is a tool for serving and scaling PyTorch models in production. TorchServe default configuration lacks proper input validation, enabling third parties to invoke remote HTTP download requests and write files to the disk. This issue could be taken advantage of to compromise the integrity of the system and sensitive data. This issue is present in versions 0.1.0 to 0.8.1. A user is able to load the model of their choice from any URL that they would like to use. The user of TorchServe is responsible for configuring both the allowed_urls and specifying the model URL to be used. A pull request to warn the user when the default value for allowed_urls is used has been merged in PR #2534. TorchServe release 0.8.2 includes this change. Users are advised to upgrade. There are no known workarounds for this issue.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":"2023-10-02","github_poc":2,"max_poc_stars":40,"metasploit":1,"nuclei":1,"refs":[{"date":"2023-10-02T11:33:37Z","kind":"github_poc","ref":"https://github.com/OligoCyberSecurity/ShellTorchChecker","stars":40,"title":"A tool that checks if a TorchServe instance is vulnerable to CVE-2023-43654"},{"date":"2024-05-28T10:02:13Z","kind":"github_poc","ref":"https://github.com/OligoCyberSecurity/CVE-2023-43654","stars":3,"title":"Demo for CVE-2023-43654 - Remote Code Execution in PyTorch TorchServe"},{"date":"2023-10-03","kind":"metasploit","ref":"exploit/multi/http/torchserver_cve_2023_43654","stars":null,"title":"PyTorch Model Server Registration and Deserialization RCE"},{"date":null,"kind":"nuclei","ref":"http/cves/2023/CVE-2023-43654.yaml","stars":null,"title":"PyTorch TorchServe SSRF"}],"tier":"weaponised"},"has_fix":true,"headline":"TorchServe Server-Side Request Forgery","id":"CVE-2023-43654","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"ssrf","year":"2023"},"n_packages":3,"n_references":4,"next":{"headline":"Remote Code Execution via web-accessible composer.phar","id":"CVE-2023-43655"},"packages":[{"ecosystem":"PyPI","fixed":["0.8.2"],"introduced":["0.1.0"],"last_affected":[],"package":"torchserve","purl":null,"source":"GHSA-8fxr-qfr9-p34w"},{"ecosystem":"PyPI","fixed":["0.8.2"],"introduced":["0.1.0"],"last_affected":[],"package":"torchserve","purl":"pkg:pypi/torchserve","source":"GHSA-8fxr-qfr9-p34w"},{"ecosystem":"PyPI","fixed":["0.8.2"],"introduced":["0.1.0"],"last_affected":[],"package":"torchserve","purl":"pkg:pypi/torchserve","source":"PYSEC-2026-553"}],"prev":{"headline":"Non-MFA account takeover via using only SSH public key to login in jumpserver","id":"CVE-2023-43652"},"products":["serve"],"published":"2023-09-28","related":[{"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"},{"cvss_score":5.3,"headline":"TorchServe ZipSlip","id":"CVE-2023-48299","kev_date_added":null,"published":"2023-11-21"}],"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)"},{"class":"attribution","licence":"BSD-3-Clause","name":"Metasploit"},{"class":"attribution","licence":"MIT","name":"Nuclei templates"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-02-13","vendors":["pytorch"]},"summary":"Attackers can exploit TorchServe's default configuration to trigger remote HTTP requests and write files, compromising system integrity and sensitive data.","url":"https://insights.sbomify.com/CVE-2023-43654/"}