CVE-2026-40909
Received Received - Intake
Path Traversal and RCE in WWBN AVideo Locale Save Endpoint

Publication date: 2026-04-21

Last updated on: 2026-04-23

Assigner: GitHub, Inc.

Description
WWBN AVideo is an open source video platform. In versions 29.0 and prior, the locale save endpoint (`locale/save.php`) constructs a file path by directly concatenating `$_POST['flag']` into the path at line 30 without any sanitization. The `$_POST['code']` parameter is then written verbatim to that path via `fwrite()` at line 40. An admin attacker (or any user who can CSRF an admin, since no CSRF token is checked and cookies use `SameSite=None`) can traverse out of the `locale/` directory and write arbitrary `.php` files to any writable location on the filesystem, achieving Remote Code Execution. Commit 57f89ffbc27d37c9d9dd727212334846e78ac21a fixes the issue.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-04-21
Last Modified
2026-04-23
Generated
2026-05-06
AI Q&A
2026-04-21
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
wwbn avideo to 29.0 (inc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-22 The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
Attack-Flow Graph
AI Powered Q&A
How can this vulnerability impact me? :

This vulnerability can have severe impacts including full server compromise through Remote Code Execution. An attacker can write arbitrary PHP code to any writable location on the filesystem, potentially creating webshells to execute commands remotely.

  • Remote Code Execution allowing full control over the server.
  • Privilege escalation by accessing or modifying databases and user data.
  • Ability to pivot to other services or systems connected to the compromised server.
  • Exploitation via CSRF attacks due to lack of CSRF token validation and permissive cookie settings.

How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability can be detected by checking for unauthorized or suspicious POST requests to the `locale/save.php` endpoint that include directory traversal sequences in the `flag` parameter and arbitrary PHP code in the `code` parameter.

A practical detection method is to monitor web server logs or use command-line tools to search for such POST requests.

  • Use grep or similar tools to find POST requests with suspicious `flag` values, for example: `grep "POST /locale/save.php" /var/log/apache2/access.log | grep "flag=.."`
  • Look for files with unexpected `.php` extensions outside the intended `locale/` directory, which may indicate exploitation attempts.
  • Example curl command to test if the endpoint is vulnerable (do not run on production without authorization): ``` curl -b 'PHPSESSID=<admin_session>' -X POST 'https://target/locale/save.php' -d 'flag=../../webshell&code=$t["x"]=1;?><?php system($_GET["c"]);' ```

Can you explain this vulnerability to me?

CVE-2026-40909 is a vulnerability in the WWBN AVideo open source video platform (versions 29.0 and prior) involving a path traversal flaw in the locale save endpoint (`locale/save.php`). The vulnerability arises because the `flag` parameter from a POST request is directly concatenated into a file path without any sanitization, allowing an attacker to traverse directories outside the intended locale directory.

An attacker with admin privileges, or anyone who can perform a Cross-Site Request Forgery (CSRF) attack against an admin (due to missing CSRF token validation and permissive cookie settings), can exploit this flaw to write arbitrary PHP files anywhere writable on the server. This leads to Remote Code Execution (RCE), enabling full server compromise.


What immediate steps should I take to mitigate this vulnerability?

Immediate mitigation steps include applying the official patch that fixes the vulnerability by sanitizing inputs and adding CSRF token validation.

  • Update the `locale/save.php` script to validate a global token (`globalToken`) on each request to prevent CSRF attacks.
  • Sanitize the `flag` parameter using `basename()` and validate it against a strict regex to prevent directory traversal.
  • Implement checks to ensure the resolved file path is within the intended directory using `realpath()`.
  • Add error handling to return JSON error responses if file operations fail.
  • Restrict the `code` parameter to safe content, disallowing arbitrary PHP code.

If patching is not immediately possible, restrict access to the `locale/save.php` endpoint to trusted admin IPs and monitor for suspicious activity.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

The vulnerability allows an attacker to achieve remote code execution (RCE) by writing arbitrary PHP files on the server, potentially leading to full server compromise.

Such a compromise can result in unauthorized access to sensitive data, including personal or protected health information, which could violate compliance requirements under standards like GDPR and HIPAA.

The lack of CSRF protection and the ability to escalate privileges increase the risk of data breaches, making it harder for organizations to maintain regulatory compliance.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart