제출 #1078347: https://github.com/zellij-org/ zellij 0.45.1 (commit efd8fd5a89a20c07a111d248ad7fce53848d2c18) and on main (commit 519a23715c6b0f65a3ffada64e738ed6ec9380fc) Path Traversal정보

제목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)
제출2026. 11. 06. PM 06:07 (22 날 ago)
모더레이션2026. 11. 29. AM 03:36 (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