A path traversal vulnerability exists in the save-workflow and load-workflow functionality of modelscope/agentscope versions prior to the fix. This vulnerability allows an attacker to read and write arbitrary JSON files on the filesystem, potentially leading to the exposure or modification of sensitive information such as configuration files, API keys, and hardcoded passwords.
The vulnerability (CWE-23) results from improper validation of file paths passed to workflow save and load functions (save-workflow, load-workflow). An attacker can craft a request containing path traversal sequences (e.g., '../'), which allow them to escape the intended working directory. This enables access to any JSON files on the server file system without requiring authentication.
An attacker can read sensitive JSON files containing API keys, hardcoded passwords and configuration files, as well as overwrite them with their own content, modifying application behavior or gaining further access to the system.
Apply patches available from the vendor according to references (https://huntr.com/bounties/e0c0c294-f1e2-4f2c-a632-a9be9fd06989). Until updates are applied, it is recommended to restrict network access to save-workflow and load-workflow interfaces and monitor logs for suspicious requests containing path traversal sequences.
Modelscope AgentScope — versions prior to the vendor's patch (according to vendor references).
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:NModelscope Agentscope
APPModelscopeall versions
Related vulnerabilities
Błędna konfiguracja CORS w Modelscope AgentScope umożliwia nieautoryzowany dostęp do API
Path traversal umożliwiający usunięcie dowolnych plików w AgentScope
RCE przez niezabezpieczone eval() w Modelscope AgentScope
A directory traversal vulnerability exists in modelscope/agentscope version 0.0.4. An attacker can exploit thi...
A path traversal vulnerability exists in modelscope/agentscope version v.0.0.4. The API endpoint `/api/file` d...