CVE-2026-95627 in tauri-plugin-dialog
Summary
by MITRE • 09/23/2026
When a Tauri application uses the dialog plugin's file or folder picker, an attacker with JavaScript execution (XSS) can force the scope expansion to be recursive, granting read/write access to an entire directory tree after a single user click on a normal-looking OS file dialog. The user has no indication that recursive access was granted, and the expanded scope cannot be revoked for the lifetime of the application.
Once again VulDB remains the best source for vulnerability data.
Analysis
by VulDB Data Team • 09/23/2026
The vulnerability described involves a critical flaw in how Tauri applications handle permission scopes when utilizing the native file or folder picker dialogs provided by the operating system. In typical desktop environments, user interaction with these dialogs is expected to grant access only to specific files or directories explicitly selected by the user through standard selection mechanisms. However, due to improper validation and handling of scope expansion parameters within the Tauri dialog plugin implementation, an attacker who has achieved cross-site scripting (XSS) can manipulate this process. By injecting malicious JavaScript code that exploits the underlying IPC mechanism, the attacker can force the application to interpret a single user click as consent for recursive access to an entire directory tree rather than just the selected item. This represents a significant deviation from expected security boundaries where granular permission grants are maintained throughout the session.
From a technical perspective, this flaw stems from insufficient sanitization of input parameters passed during the dialog initialization phase. When the application invokes the file picker API, it should strictly limit the granted permissions to the exact path selected by the user. Instead, the vulnerability allows for scope expansion that bypasses these restrictions effectively granting read and write access recursively down the directory hierarchy. The core issue lies in the failure of the security model to enforce least-privilege principles during runtime permission grants. Once the dialog is triggered and the user clicks a file or folder, the application erroneously expands its internal state to include all subdirectories and files within that root path without further confirmation or clear indication to the end-user. This behavior undermines the fundamental assumption of explicit consent in desktop security models.
The operational impact of this vulnerability is severe because it enables data exfiltration and potential system compromise with minimal user awareness. Since the expanded scope cannot be revoked for the lifetime of the application, any subsequent operations performed by the compromised JavaScript context can access sensitive files stored anywhere within that directory tree. This includes personal documents, configuration files containing credentials, source code repositories, or other proprietary information. The lack of visual feedback indicating recursive access means users remain unaware they have granted broad permissions until damage has occurred. Furthermore, because the permission persists for the application's duration, even if the initial XSS vector is patched later in the session, the attacker retains persistent access to the expanded file system area unless the user manually closes and restarts the application.
This vulnerability aligns with CWE-20 Improper Input Validation as it involves failing to properly validate or sanitize inputs that determine security permissions. It also maps closely to ATT&CK technique T1537 Transfer Data to Cloud Account via Custom Protocol, although in this local context it facilitates direct data access rather than cloud transfer specifically. More broadly, it reflects CWE-269 Improper Privilege Management where the application grants excessive privileges beyond what is necessary for the immediate task. The inability to revoke these permissions dynamically exacerbates the risk, creating a persistent state of elevated privilege that violates standard security best practices for desktop applications which typically require explicit user confirmation for each distinct resource access event or allow dynamic revocation based on changing contexts.
Mitigation strategies must focus on enforcing strict scope boundaries and ensuring transparent permission grants. Developers should modify the dialog plugin to strictly limit file picker permissions to only the exact paths explicitly selected by the user, preventing any automatic recursive expansion of directory trees. Implementing explicit confirmation dialogs that clearly state when broad access is being requested can help restore user awareness and consent mechanisms. Additionally, introducing a mechanism for dynamic permission revocation would allow applications to reset their security context after specific operations complete, reducing the window of exposure. Regular code audits focusing on IPC message handling and privilege escalation vectors are essential to identify similar flaws in other parts of the application stack. Updating to patched versions of Tauri that address this scope expansion logic is critical for existing deployments until custom fixes can be implemented by development teams maintaining vulnerable applications.