Description
The Chat controller accepts a history JSON parameter from the browser and passes it unsanitized to AgentLoop. A malicious admin can inject system/tool role messages to override safety instructions.
Location
Controller/Adminhtml/Assistant/Chat.php:47-51
Model/Assistant/AgentLoop.php:31
Fix
Validate conversation history roles, strip tool_calls from client messages.
Description
The Chat controller accepts a
historyJSON parameter from the browser and passes it unsanitized to AgentLoop. A malicious admin can inject system/tool role messages to override safety instructions.Location
Controller/Adminhtml/Assistant/Chat.php:47-51Model/Assistant/AgentLoop.php:31Fix
Validate conversation history roles, strip tool_calls from client messages.