{"answers":{"affected":"4 open source packages ship an affected version, including @tauri-apps/plugin-shell and tauri-plugin-shell. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-31477 exists.","fix":"Upgrade @tauri-apps/plugin-shell to 2.2.1 or later.","what":"CVE-2025-31477 is a critical command injection vulnerability in tauri-apps plugins-workspace, published on 2 Apr 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-31477 and fix it if it is affected.\n\nWhat it is: CVE-2025-31477 is a critical command injection vulnerability in tauri-apps plugins-workspace, published on 2 Apr 2025. 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-2025-31477 exists.\n\nAffected packages and fixed versions:\n- @tauri-apps/plugin-shell (npm): affected all versions; fixed in 2.2.1\n- @tauri-apps/plugin-shell (npm): affected all versions; fixed in 2.2.1\n- tauri-plugin-shell (crates.io): affected all versions; fixed in 2.2.1\n- tauri-plugin-shell (crates.io): affected all versions; fixed in 2.2.1\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-2025-31477/ (Markdown: https://insights.sbomify.com/CVE-2025-31477/index.md)","id":"CVE-2025-31477","markdown":"https://insights.sbomify.com/CVE-2025-31477/index.md","name":"CVE-2025-31477","record":{"aliases":["GHSA-c9pr-q8gx-3mgp"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Tauri shell plugin","requires_auth":"none","summary":"Attackers can achieve remote code execution by abusing improper protocol validation in the Tauri shell plugin's open endpoint.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"plugin-shell","vendor":"tauri"}],"cvss":{"score":9.3,"severity":"critical","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","version":"4.0"},"cwes":[{"id":"CWE-20","name":"Improper Input Validation"}],"description":"The Tauri shell plugin allows access to the system shell. Prior to 2.2.1, the Tauri shell plugin exposes functionality to execute code and open programs on the system. The open endpoint of this plugin is designed to allow open functionality with the system opener (e.g. xdg-open on Linux). This was meant to be restricted to a reasonable number of protocols like https or mailto by default. This default restriction was not functional due to improper validation of the allowed protocols, allowing for potentially dangerous protocols like file://, smb://, or nfs:// and others to be opened by the system registered protocol handler. By passing untrusted user input to the open endpoint these potentially dangerous protocols can be abused to gain remote code execution on the system. This either requires direct exposure of the endpoint to application users or code execution in the frontend of a Tauri application. This vulnerability is fixed in 2.2.1.","ecosystems":["crates.io","npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Improper Scope Validation in the open Endpoint of tauri-plugin-shell","id":"CVE-2025-31477","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"command_injection","year":"2025"},"n_packages":4,"n_references":2,"next":{"headline":"Zulip Authentication Backend Configuration Bypass","id":"CVE-2025-31478"},"packages":[{"ecosystem":"crates.io","fixed":["2.2.1"],"introduced":["0"],"last_affected":[],"package":"tauri-plugin-shell","purl":null,"source":"GHSA-c9pr-q8gx-3mgp"},{"ecosystem":"crates.io","fixed":["2.2.1"],"introduced":["0"],"last_affected":[],"package":"tauri-plugin-shell","purl":"pkg:cargo/tauri-plugin-shell","source":"GHSA-c9pr-q8gx-3mgp"},{"ecosystem":"npm","fixed":["2.2.1"],"introduced":["0"],"last_affected":[],"package":"@tauri-apps/plugin-shell","purl":null,"source":"GHSA-c9pr-q8gx-3mgp"},{"ecosystem":"npm","fixed":["2.2.1"],"introduced":["0"],"last_affected":[],"package":"@tauri-apps/plugin-shell","purl":"pkg:npm/%40tauri-apps/plugin-shell","source":"GHSA-c9pr-q8gx-3mgp"}],"prev":{"headline":"tarteaucitron.js allows url scheme injection via unfiltered inputs","id":"CVE-2025-31476"},"products":["plugins-workspace"],"published":"2025-04-02","related":[],"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":"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":"total"},"state":"PUBLISHED","updated":"2025-04-03","vendors":["tauri-apps"]},"summary":"Attackers can achieve remote code execution by abusing improper protocol validation in the Tauri shell plugin's open endpoint.","url":"https://insights.sbomify.com/CVE-2025-31477/"}