CVE-2026-34733: AVideo: Unauthenticated File Deletion via PHP Operator Precedence Bug in CLI Guard

Published Mar 31, 2026
·
Updated

Summary

The AVideo installation script install/deleteSystemdPrivate.php contains a PHP operator precedence bug in its CLI-only access guard. The script is intended to run exclusively from the command line, but the guard condition !phpsapiname() === 'cli' never evaluates to true due to how PHP resolves operator precedence. The ! (logical NOT) operator binds more tightly than === (strict comparison), causing the expression to always evaluate to false, which means the die() statement never executes. As a result, the script is accessible via HTTP without authentication and will delete files from the server's temp directory while also disclosing the temp directory contents in its response.

Details

The faulty guard is at lines 2-4 of the script:

php // install/deleteSystemdPrivate.php:2-4 if (!phpsapiname() === 'cli') { die('Command Line only'); }

Due to PHP operator precedence, this expression is parsed as:

php if ((!phpsapiname()) === 'cli') {

Step-by-step evaluation when accessed via HTTP (Apache/nginx with modphp or php-fpm):

1. phpsapiname() returns "apache2handler" (or "fpm-fcgi", etc.) - a non-empty string 2. !phpsapiname() applies logical NOT to a truthy string, yielding false 3. false === 'cli' is a strict comparison between a boolean and a string, which is always false 4. The if body (die()) is never entered

The correct code should be:

php if (phpsapiname() !== 'cli') { die('Command Line only'); }

After the bypassed guard, the script enumerates and deletes aged files from the system temp directory:

php $glob = glob(sysgettempdir() . "/"); // ... foreach ($glob as $file) { if (filemtime($file) < $onedayago) { unlink($file); // Deletes the file } }

The script also outputs the total number of items found and details about processed files, leaking information about the temp directory contents.

Confirmed on a live instance: an unauthenticated HTTP GET request returned HTTP 200 with the response body including "Found total of 91 items", confirming the guard bypass and information disclosure.

Proof of Concept

Step 1: Verify the endpoint is accessible without authentication:

bash curl -v "https://your-avideo-instance.com/install/deleteSystemdPrivate.php"

Expected response (HTTP 200):

Found total of 91 items Processing /tmp/phpXXXXXX ... Deleted: /tmp/oldsessionfile ...

If the guard were working correctly, the response would be:

Command Line only

Step 2: Demonstrate the PHP operator precedence bug locally:

php <?php // Simulates the bug $sapi = 'apache2handler'; // non-CLI SAPI

// Buggy check (as written in deleteSystemdPrivate.php) vardump(!$sapi === 'cli'); // Output: bool(false) - guard never triggers

// Correct check vardump($sapi !== 'cli'); // Output: bool(true) - guard would trigger correctly ?>

Step 3: Monitor the effect by checking before and after:

bash Check initial state curl -s "https://your-avideo-instance.com/install/deleteSystemdPrivate.php" | head -1 Output: "Found total of 91 items"

Wait and check again - files older than 24 hours will have been deleted curl -s "https://your-avideo-instance.com/install/deleteSystemdPrivate.php" | head -1 Output: "Found total of 47 items" (fewer items after deletion)

Impact

An unauthenticated attacker can trigger deletion of files in the server's system temp directory by simply sending an HTTP request to this endpoint. The impact includes:

- File deletion: Any files in the temp directory older than 24 hours are deleted. This can disrupt server operations by removing PHP session files, upload temp files, cache files, or files used by other applications sharing the same temp directory. - Information disclosure: The script's output reveals the full path of the temp directory and enumerates its contents, including file names and counts. This can expose internal server paths, session file names, and the presence of other applications. - Denial of service: Repeated requests can be used to continuously purge temp files, interfering with file uploads, session management, and other temp-dependent operations.

The root cause is a common PHP pitfall where the logical NOT operator (!) has higher precedence than strict comparison (===), causing the intended CLI-only guard to be completely ineffective.

- CWE-284: Improper Access Control - Severity: Medium

Recommended Fix

Fix the operator precedence bug at install/deleteSystemdPrivate.php:2 by replacing the negation with the !== operator:

php // install/deleteSystemdPrivate.php:2 // Before (broken - always evaluates to false): if (!phpsapiname() === 'cli') {

// After (correct): if (phpsapiname() !== 'cli') {

--- Found by aisafe.io

Other sources

WWBN AVideo is an open source video platform. In versions 26.0 and prior, the AVideo installation script install/deleteSystemdPrivate.php contains a PHP operator precedence bug in its CLI-only access guard. The script is intended to run exclusively from the command line, but the guard condition !phpsapiname() === 'cli' never evaluates to true due to how PHP resolves operator precedence. The ! (logical NOT) operator binds more tightly than === (strict comparison), causing the expression to always evaluate to false, which means the die() statement never executes. As a result, the script is accessible via HTTP without authentication and will delete files from the server's temp directory while also disclosing the temp directory contents in its response. At time of publication, there are no publicly available patches.

NVD

Affected Software

3 affected components
WWBN AVideo<=26.0
WWBN AVideo<=26.0
composer/wwbn/avideo<=26.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Fix the operator precedence bug in `install/deleteSystemdPrivate.php` (lines 2-4) by changing the guard from `if (!php_sapi_name() === 'cli')` to `if (php_sapi_name() !== 'cli')` so the `die('Command Line only');` condition actually triggers for non-CLI SAPI requests.

    AVideo installation script (install/deleteSystemdPrivate.php) CLI-only access guard comparison = Replace `if (!php_sapi_name() === 'cli')` with `if (php_sapi_name() !== 'cli')`

Event History

Mar 31, 2026
CVE Published
via MITRE·08:52 PM
Data Sourced
via MITRE·08:52 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:16 PM
DescriptionSeverityWeaknessAffected Software
Apr 1, 2026
Advisory Published
via GitHub·09:06 PM
Data Sourced
via GitHub·09:06 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-34733?

CVE-2026-34733 is considered a high severity vulnerability due to its potential for unauthenticated file deletion.

2

How do I fix CVE-2026-34733?

To fix CVE-2026-34733, upgrade AVideo to version 26.1 or later which addresses the operator precedence bug.

3

What versions of AVideo are affected by CVE-2026-34733?

Versions of AVideo up to and including 26.0 are affected by CVE-2026-34733.

4

What kind of vulnerability is CVE-2026-34733?

CVE-2026-34733 is an unauthenticated file deletion vulnerability that can be exploited via a PHP bug in the AVideo CLI access guard.

5

Who is the vendor for CVE-2026-34733?

The vendor for CVE-2026-34733 is WWBN, which develops the AVideo platform.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203