@pensar/apex <= 0.0.58 уязвим для внедрения команд ОС с помощью инструмента smart_enumerate. Функция createSmartEnumerateTool() в src/core/agent/tools.ts создает команду оболочки путем объединения необработанных значений из массива расширений и параметра url в строку, передаваемую в Node.js child_process.exec(). Поскольку exec() порождает оболочку, метасимволы оболочки в этих значениях интерпретируются оболочкой хоста, что приводит к выполнению произвольной команды ОС с привилегиями запущенного процесса.
ПРИМЕЧАНИЕ. Поставщик оспаривает это, поскольку отчет касается предполагаемого поведения, как описано в Политике безопасности репозитория pensarai/apex на GitHub.
Показать оригинальное описание (EN)
@pensar/apex <= 0.0.58 is vulnerable to OS command injection via the smart_enumerate tool. The createSmartEnumerateTool() function in src/core/agent/tools.ts constructs a shell command by concatenating unsanitized values from the extensions array and url parameter into a string passed to Node.js child_process.exec(). Because exec() spawns a shell, shell metacharacters in those values are interpreted by the host shell, resulting in arbitrary OS command execution with the privileges of the running process. NOTE: this is disputed by the Supplier because the report is about intended behavior, as explained in the Security Policy of the pensarai/apex GitHub repo.
Характеристики атаки
Последствия
Строка CVSS v3.1