{"uuid": "e681e244-8023-4084-8673-4704c51b26f2", "vulnerability_lookup_origin": "1a89b78e-f703-45f3-bb86-59eb712668bd", "author": "9f56dd64-161d-43a6-b9c3-555944290a09", "vulnerability": "CVE-2025-64328", "type": "seen", "source": "https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/unix/http/freepbx_filestore_cmd_injection.rb", "content": "{\"aliases\": [], \"arch\": \"cmd\", \"author\": [\"Cory Billington\", \"Valentin Lobstein \"], \"autofilter_ports\": [80, 8080, 443, 8000, 8888, 8880, 8008, 3000, 8443], \"autofilter_services\": [\"http\", \"https\"], \"check\": true, \"default_credential\": false, \"description\": \"This module exploits an authenticated command injection vulnerability (CVE-2025-64328) in the\\n          FreePBX filestore module. The filestore module allows administrators to configure remote file\\n          storage backends (SSH, FTP, etc.) for backup and file management purposes.\\n\\n          The vulnerability exists in the SSH driver's testconnection functionality, specifically in the\\n          check_ssh_connect() function located at /admin/modules/filestore/drivers/SSH/testconnection.php.\\n          The function accepts user-controlled input for the SSH key path parameter, which is then passed\\n          unsanitized to exec() calls when generating SSH keys.\\n\\n          The vulnerable code executes commands such as:\\n          exec(\\\"ssh-keygen -t ecdsa -b 521 -f $key -N \\\\\\\"\\\\\\\" &amp;&amp; chown asterisk:asterisk $key &amp;&amp; chmod 600 $key\\\");\\n\\n          By injecting shell command substitution syntax (e.g., $(command)) into the key parameter, an\\n          authenticated user can execute arbitrary commands on the underlying system with the privileges of\\n          the web server process (typically the asterisk user).\\n\\n          This vulnerability affects filestore module versions 17.0.2.36 through 17.0.2.44 (introduced in\\n          17.0.2.36, patched in 17.0.3). The module requires valid FreePBX credentials for a user account that\\n          has access to the filestore module. The user must be in the \\\"Filestore\\\" group (administrator or\\n          low-privilege user).\\n\\n          Note: Due to the vulnerable code structure, the injected command may be executed multiple times,\\n          potentially resulting in multiple Meterpreter sessions.\", \"disclosure_date\": \"2025-11-08\", \"fullname\": \"exploit/unix/http/freepbx_filestore_cmd_injection\", \"is_install_path\": true, \"mod_time\": \"2026-03-11 20:09:52 +0000\", \"name\": \"FreePBX filestore authenticated command injection\", \"needs_cleanup\": null, \"notes\": {\"Reliability\": [\"repeatable-session\"], \"SideEffects\": [\"artifacts-on-disk\", \"ioc-in-logs\"], \"Stability\": [\"crash-safe\"]}, \"path\": \"/modules/exploits/unix/http/freepbx_filestore_cmd_injection.rb\", \"platform\": \"Linux,Unix\", \"post_auth\": true, \"rank\": 600, \"ref_name\": \"unix/http/freepbx_filestore_cmd_injection\", \"references\": [\"CVE-2025-64328\", \"GHSA-vm9p-46mv-5xvw\", \"URL-https://theyhack.me/CVE-2025-64328-FreePBX-Authenticated-Command-Injection/\"], \"rport\": 80, \"session_types\": false, \"targets\": [\"Unix Command\"], \"type\": \"exploit\"}", "creation_timestamp": "2026-09-08T06:50:36.112409Z"}