Summary
AVideo's stopLive.php endpoint combines missing CSRF token validation with unsafe handling of a user-controlled path parameter. If an administrator visits a malicious page while authenticated, an attacker may cause recursive deletion of directories outside the intended location.
Affected context
The vulnerability occurs in deployments where stopLive.php processes the key parameter to construct filesystem paths and does not adequately validate the request's CSRF token. Risk is increased when an administrator has an active authenticated session and the endpoint can reach directories containing application or media data.
Exploit preconditions
- Attack surface: A web-accessible
stopLive.phpendpoint - Required access: An authenticated administrator must be induced to visit attacker-controlled content
- Trigger point: Processing of a request containing a crafted
keyparameter - Why exploitation is possible: Missing CSRF protection permits cross-site request initiation, while unsanitized path concatenation allows traversal to unintended directories
Why this happens
The issue combines two insecure patterns. First, the state-changing endpoint does not adequately verify that requests originated from the application's trusted interface, corresponding to cross-site request forgery. Second, attacker-controlled path data is concatenated into filesystem operations without canonicalization and boundary enforcement, mapping to CWE-73: External Control of File Name or Path. Together, these weaknesses can direct a privileged deletion operation toward locations outside its intended directory.
Potential impact
- An attacker may delete application or media directories
- Stored videos, images, or other content could be lost
- The service may become unavailable or behave unpredictably
- Recovery efforts could require restoration from trusted backups
- Related application data may be disrupted if reachable through the traversal path
General mitigation guidance
Mitigation generally focuses on protecting state-changing requests and eliminating filesystem path ambiguity.
Common defensive patterns include:
- Require unpredictable, session-bound CSRF tokens for destructive actions
- Accept only server-defined identifiers or allowlisted relative names instead of raw paths
- Canonicalize candidate paths and enforce that they remain within a designated base directory
- Reject traversal markers, absolute paths, unexpected separators, and encoded path variants as defense-in-depth
- Apply least-privilege permissions to the web process and its media directories
- Use non-destructive defaults and require explicit authorization for recursive deletion
- Preserve tested backups and recovery controls for user-managed content
How teams detect issues like this
Organizations can identify similar weaknesses through:
- Static analysis rules for filesystem calls receiving request parameters
- Code review checks for missing CSRF validation on state-changing endpoints
- Searches for string concatenation or interpolation used to form paths
- Tests covering canonicalization, encoded traversal variants, and base-directory enforcement
- Web application policies that require CSRF protection for destructive operations
- Runtime monitoring for unusual recursive deletion requests or filesystem activity outside approved directories
Automated security review tools may help flag path construction and missing request-integrity checks, but findings should be validated against deployment-specific authorization flows.

