GHSA-vv7w-qf5c-734w AVideo Affected by Unauthenticated Disk Space Exhaustion via Unlimited Temp File Creation in aVideoEncoderChunk.json.php
SummaryThe `aVideoEncoderChunk.json.php` endpoint is a completely standalone PHP script with no authentication, no framework includes, and no resource limits. An unauthenticated remote attacker can send arbitrary POST data which is written to persistent temp files in `/tmp/` with no size cap, no rate limiting, and no cleanup mechanism. This allows trivial disk space exhaustion leading to denial of service of the entire server.DetailsThe file `objects/aVideoEncoderChunk.json.php` (25 lines total) operates entirely outside the AVideo framework:The vulnerability chain:**No authentication**: The script includes no session handling, no `require_once` of the framework, no `useVideoHashOrLogin()`, no `canUpload()` — nothing. Compare with `aVideoEncoder.json.php` which includes `configuration.php` and calls authentication functions.**No size limits**: `php://input` is read until exhaustion. The effective limit is PHP's `post_max_size`, which AVideo's `.htaccess` has commented-out settings for 4GB (`#php_value post_max_size 4G` at line 536). Default AVideo installations recommend at least 100MB.**No cleanup**: A grep for `YTPChunk_` across the entire codebase returns only the chunk file itself. No cron job, no garbage collection, no consumer that deletes files after processing. The temp files persist until the server is manually cleaned.**Path disclosure**: The response JSON includes the full filesystem temp path (e.g., `/tmp/YTPChunk_abc123`), revealing server directory structure.**CORS wildcard**: `Access-Control-Allow-Origin: *` on line 2 means any malicious webpage can trigger this attack via the visitor's browser, potentially distributing the attack across many source IPs.**Public routing**: `.htaccess` line 437 rewrites `/aVideoEncoderChunk.json` to this file, making it accessible at a clean URL.PoC**Step 1: Confirm endpoint is accessible and unauthenticated**Expected output:**Step 2: Write a large temp file (100MB)**Expected output:**Step 3: Parallel disk exhaustion (10 concurrent 100MB requests = 1GB)****Step 4: Verify files persist (they are never cleaned up)**Impact**Denial of Service**: Filling `/tmp/` causes cascading failures — PHP session handling breaks, MySQL temp tables fail, and system services relying on tmpfs crash. This can take down the entire server, not just AVideo.**No authentication barrier**: Any anonymous internet user can trigger this attack.**Cross-origin exploitation**: The CORS wildcard header allows any malicious website to use visitors' browsers as distributed attack proxies, bypassing IP-based rate limiting at the network level.**Information disclosure**: The temp file path in the response reveals the server's filesystem layout.**Persistence**: Created files are never cleaned up, so even a brief attack has lasting impact until manual intervention.Recommended FixReplace `objects/aVideoEncoderChunk.json.php` with a version that includes authentication, size limits, and cleanup:Additionally, add a cleanup cron job or garbage collection to remove `YTPChunk_*` files older than a configurable timeout (e.g., 1 hour).
CVSS v3.1 score: 7.5