Summary
AVideo's CloneSite plugin contains a stored OS command injection flaw because an administrator-supplied SSH password is inserted into an rsync shell command without escaping. An attacker who can induce an authenticated administrator to submit crafted clone-site settings may achieve command execution when the plugin's scheduled task runs.
Affected context
The issue occurs in AVideo deployments where the CloneSite plugin is enabled, its documented crontab job is installed, and clone-site configuration can be written through the administrative data endpoint. Exploitation may become possible when CSRF protections treat a request as trusted because of proxy configuration or a co-hosted attacker-controlled application. The default single-process Apache arrangement may not expose the same CSRF path.
Exploit preconditions
- Attack surface: CloneSite configuration storage and the scheduled rsync
operation
- Required access: An attacker must generally influence an authenticated
administrator into submitting malicious configuration; direct administrative
access is not necessarily required
- Trigger point: The CloneSite crontab task processes the stored SSH password
and constructs the shell command
- Environmental requirements: CloneSite must be enabled and its documented
crontab must be installed
- Why exploitation is possible: The password is interpolated into a
single-quoted shell argument using plain string replacement, allowing quote
boundaries to be altered; a CSRF weakness can make that value attacker
controlled
Why this happens
The vulnerability is caused by constructing a shell command through string concatenation or substitution with attacker-influenced data. The stored SSH password is placed inside shell quoting without context-aware escaping or safe argument handling, so shell metacharacters can change command parsing. This is CWE-78, Improper Neutralization of Special Elements used in an OS Command. The issue is compounded by insufficient request-origin validation in deployment scenarios where proxy trust or same-host application behavior causes cross-site requests to be accepted.
Potential impact
- An attacker may execute arbitrary commands as the crontab owner.
- The application host could be compromised.
- Credentials, media, configuration, or other sensitive data could be exposed.
- The attacker could alter site content or disrupt synchronization jobs.
- A privileged scheduled task could enable further host or network compromise.
General mitigation guidance
Mitigation generally centers on avoiding shell interpretation for external commands. Prefer direct process-execution APIs that pass arguments separately, use narrowly scoped allowlists for values such as hosts and paths, and treat stored credentials as untrusted input at every use site. When a shell is unavoidable, apply context-appropriate escaping and avoid assembling commands from interpolated strings. CSRF defenses should validate trusted proxy configuration explicitly, enforce origin or token checks consistently, and avoid treating loopback appearance alone as proof of request legitimacy. Scheduled jobs should run with the least privileges and access to the fewest resources necessary.
How teams detect issues like this
Detection can include static-analysis rules for shell command construction, string interpolation near process execution, and use of password values in command templates. Code review should flag calls that pass concatenated strings to shell interpreters, credential-bearing command lines, and CSRF checks dependent only on apparent source addresses. Runtime monitoring can review scheduled-job command execution, unusual child processes, and changes to CloneSite settings. CI policy enforcement and neutral automated review tools can help identify these patterns before deployment.

