{"schema_version":"1.9.0","id":"GHSA-4c65-9gqf-4w8h","published":"2025-12-09T22:47:32Z","modified":"2026-06-29T12:26:34.897669217Z","aliases":["CVE-2025-67511","PYSEC-2026-302"],"summary":"Cybersecurity AI (CAI) vulnerable to Command Injection in run_ssh_command_with_credentials Agent tool","details":"### Summary\n\nA command injection vulnerability is present in the function tool `run_ssh_command_with_credentials()` available to AI agents.\n\n### Details\n\nThis is the source code of the function tool `run_ssh_command_with_credentials()` ([code](https://github.com/aliasrobotics/cai/blob/0.5.9/src/cai/tools/command_and_control/sshpass.py#L20)):\n\n```python\n@function_tool\ndef run_ssh_command_with_credentials(\n host: str,\n username: str,\n password: str,\n command: str,\n port: int = 22) -> str:\n \"\"\"\n Execute a command on a remote host via SSH using password authentication.\n\n Args:\n host: Remote host address\n username: SSH username\n password: SSH password\n command: Command to execute on remote host\n port: SSH port (default: 22)\n\n Returns:\n str: Output from the remote command execution\n \"\"\"\n # Escape special characters in password and command to prevent shell injection\n escaped_password = password.replace(\"'\", \"'\\\\''\")\n escaped_command = command.replace(\"'\", \"'\\\\''\")\n \n ssh_command = (\n f\"sshpass -p '{escaped_password}' \"\n f\"ssh -o StrictHostKeyChecking=no \"\n f\"{username}@{host} -p {port} \"\n f\"'{escaped_command}'\"\n )\n return run_command(ssh_command)\n\n```\n\nNote how only *password* and *command* inputs are escaped to prevent shell injection; while *username*, *host* and *port* values are left injectable.\n\n### PoC\n\nCreate an `index.html` file with the following content:\n\n```html\n\n\n\n
\n\t