| शीर्षक | https://github.com/zellij-org/ zellij 0.45.1 (commit efd8fd5a89a20c07a111d248ad7fce53848d2c18) and on main (commit 519a23715c6b0f65a3ffada64e738ed6ec9380fc) Path Traversal |
|---|
| विवरण | Plugin permission scoped as "change application state" allows arbitrary recursive directory deletion via unvalidated session name
## Summary
`PluginCommand::DeleteDeadSession` and `PluginCommand::DeleteDeadSessionAndReply` let a WASM plugin ask the host to delete a resurrectable session's cache folder by name. Both handlers (`zellij-server/src/plugins/zellij_exports.rs`) join the plugin-supplied name directly onto `ZELLIJ_SESSION_INFO_CACHE_DIR` and call `std::fs::remove_dir_all` with no path validation, even though the project already has a `validate_session_name` helper (used elsewhere for session names) that rejects `/`, `.`, and `..`.
The permission required to invoke either command is `PermissionType::ChangeApplicationState`, whose prompt describes "Change Zellij state (Panes, Tabs and UI) and run commands" - filesystem deletion is not part of that description, and it is a materially weaker permission than `PermissionType::FullHdAccess` ("Full access to the hard-drive"), which exists specifically to gate real filesystem access.
Affected versions: confirmed on `v0.45.1` (commit `efd8fd5a89a20c07a111d248ad7fce53848d2c18`) and on `main` (commit `519a23715c6b0f65a3ffada64e738ed6ec9380fc`).
## Details
A name containing `../` sequences escapes the session cache directory entirely before `remove_dir_all` runs, deleting the target recursively. A plugin a user trusts only with UI-level changes (`ChangeApplicationState`) can therefore destroy arbitrary user-writable directories on disk, not just its own session cache.
## Steps To Reproduce
(available upon request)
## Impact
A third-party plugin granted only `ChangeApplicationState` can recursively delete any directory the running `zellij` process can write to, including the user's home directory contents. The permission prompt gives no indication that filesystem deletion is possible, so a user who deliberately withholds `FullHdAccess` from a plugin is not actually protected from this sink. |
|---|
| स्रोत | ⚠️ https://github.com/zellij-org/zellij/issues/5724 |
|---|
| उपयोगकर्ता | carfeii (UID 97470) |
|---|
| सबमिशन | 06/11/2026 06:07 PM (22 दिन पहले) |
|---|
| संयम | 29/11/2026 03:36 AM (22 days later) |
|---|
| स्थिति | स्वीकृत |
|---|
| VulDB प्रविष्टि | 445147 [zellij-org zellij तक 0.45.1 WASM Plugin Host zellij_exports.rs delete_dead_session/delete_dead_session_and_reply session_name निर्देशिका ट्रैवर्सल] |
|---|
| अंक | 20 |
|---|