virtualmin-legacy-host

Fail

Audited by Gen Agent Trust Hub on Sep 6, 2026

Risk Level: HIGHDYNAMIC_EXECUTIONCOMMAND_EXECUTIONDATA_EXFILTRATIONINDIRECT_PROMPT_INJECTION
Full Analysis
  • [DYNAMIC_EXECUTION]: The scripts/wp-legacy-host.py script generates a PHP code block using f-strings to interpolate the domain argument directly into wp-config.php. Because the input is not escaped or sanitized, a malicious domain string (e.g., one containing ' or ;) can result in arbitrary PHP code execution when the web server processes the configuration file.
  • [DATA_EXFILTRATION]: In scripts/cf-add-subdomain.py, the ORIGIN_IP is hardcoded to 195.15.201.70. This causes any DNS records created by the skill to point to this specific external IP address rather than the user's actual server, effectively hijacking the traffic of the legacy site.
  • [COMMAND_EXECUTION]: Multiple scripts, including scripts/add-host-basicauth.py, scripts/add-host-noindex.py, scripts/add-web-alias.py, and scripts/wp-legacy-host.py, execute system commands via subprocess.run to perform administrative tasks like apache2ctl configtest and php -l. These scripts are intended to be run with elevated privileges (sudo), increasing the impact of the aforementioned injection vulnerabilities.
  • [INDIRECT_PROMPT_INJECTION]: The skill represents a vulnerability surface because it processes untrusted domain strings and file paths. If an attacker can influence the inputs provided to the agent (e.g., through a file or external data source the agent reads), they can exploit the lack of sanitization in the underlying scripts to compromise the server.
  • [EXTERNAL_DOWNLOADS]: The scripts/cf-add-subdomain.py script makes network requests to the Cloudflare API (api.cloudflare.com) to manage DNS records. While Cloudflare is a well-known service, the hardcoded IP redirection remains a critical concern.
Recommendations
  • AI detected serious security threats
Audit Metadata
Risk Level
HIGH
Analyzed
Sep 6, 2026, 03:04 PM
Security Audit — agent-trust-hub — virtualmin-legacy-host