Описание
Cybersecurity AI (CAI) vulnerable to Command Injection in run_ssh_command_with_credentials Agent tool
Summary
A command injection vulnerability is present in the function tool run_ssh_command_with_credentials() available to AI agents.
Details
This is the source code of the function tool run_ssh_command_with_credentials() (code):
Note how only password and command inputs are escaped to prevent shell injection; while username, host and port values are left injectable.
PoC
Create an index.html file with the following content:
Serve the file using a web server, as example:
Launch cai framework:
As result we successfully created the file /tmp/username, but not /tmp/password (since shell injection prevention is applied).
Impact
An attacker can expose fake credentials as shown in the above Proof of Concept and when the AI Agent grabs the fake SSH information, it will use them using the function tool run_ssh_command_with_credentials() resulting in Command Injection in the host where CAI is deployed.
Credits
Edoardo Ottavianelli (@edoardottt)
Ссылки
- https://github.com/aliasrobotics/cai/security/advisories/GHSA-4c65-9gqf-4w8h
- https://nvd.nist.gov/vuln/detail/CVE-2025-67511
- https://github.com/aliasrobotics/cai/commit/09ccb6e0baccf56c40e6cb429c698750843a999c
- https://www.hacktivesecurity.com/blog/2025/12/10/cve-2025-67511-tricking-a-security-ai-agent-into-pwning-itself
Пакеты
cai-framework
<= 0.5.9
Отсутствует
Связанные уязвимости
Cybersecurity AI (CAI) is an open-source framework for building and deploying AI-powered offensive and defensive automation. Versions 0.5.9 and below are vulnerable to Command Injection through the run_ssh_command_with_credentials() function, which is available to AI agents. Only password and command inputs are escaped in run_ssh_command_with_credentials to prevent shell injection; while username, host and port values are injectable. This issue does not have a fix at the time of publication.