Improper Scope Validation in the open Endpoint of tauri-plugin-shell
tauri-apps plugins-workspace
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| tauri-plugin-shell crates.io |
|
|
| @tauri-apps/plugin-shell npm |
|
|
tauri-apps plugins-workspace
| Product | Affected | Fixed in |
|---|---|---|
| tauri-plugin-shell crates.io |
|
|
| @tauri-apps/plugin-shell npm |
|
|
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.
From the CVE record · GitHub_M
Before 2.2.1, the Tauri shell plugin's open endpoint does not properly validate allowed protocols, so it can pass potentially dangerous protocols to system handlers. An attacker can potentially gain remote code execution if untrusted input reaches the endpoint, either because it is exposed to application users or because the attacker can execute code in a Tauri application's frontend.
Engineers using tauri-plugin-shell or @tauri-apps/plugin-shell versions earlier than 2.2.1 should check their applications.