GitHub Advisoryadvisory · Packagist

GHSA-2hch-c97c-g99x AVideo has SSRF Protection Bypass via HTTP Redirect and DNS Rebinding in isSSRFSafeURL()

HIGH Published 2026-05-05 Modified 2026-05-13 Official page ↗
Aliases
CVE-2026-43884
Ecosystem
Packagist
Packages
wwbn/avideo
Severity
High
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
Weaknesses
CWE-918
Reviewed
2026-05-05

Affected packages

• Packagist wwbn/avideo: <= 29.0 (no fix yet)

Description

Summary Two endpoints in AVideo call `isSSRFSafeURL()` to validate user-supplied URLs, then fetch them using bare `file_get_contents()` without disabling PHP's automatic redirect following. An attacker can supply a URL pointing to a server they control that returns a 302 redirect to an internal/cloud-metadata address (e.g., `http://169.254.169.254/latest/meta-data/`). Since `isSSRFSafeURL()` only validates the *initial* URL, the redirect target bypasses all SSRF protections. A secondary finding is that 6+ callers of `isSSRFSafeURL()` discard the `$resolvedIP` out-parameter meant for DNS pinning, leaving them vulnerable to DNS rebinding TOCTOU attacks. Severity: High — CVSS 3.1: 7.7 (AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N) Details Finding 1: Redirect-Based SSRF Bypass Vulnerable code — `plugin/AI/receiveAsync.json.php` (line ~162–165): ```php // SSRF Protection: Validate URL before fetching if (!isSSRFSafeURL($imageUrl)) { // blocked } else { $imageContent = file_get_contents($imageUrl); // ← FOLLOWS REDIRECTS! } ``` Vulnerable code — `objects/EpgParser.php` (line ~358–362): ```php if (!isSSRFSafeURL($this->url)) { throw new \RuntimeException('URL blocked by SSRF protection'); } $this->content = @file_get_contents($this->url); // ← FOLLOWS REDIRECTS! ``` Safe code for comparison — `objects/functions.php`, `url_get_contents()`: ```php $opts = ['http' => ['follow_location' => 0]]; // Disable auto-redirect $context = stream_context_create($opts); for ($redirectCount = 0; $redirectCount ['follow_location' => 0]]); $imageContent = file_get_contents($imageUrl, false, $ctx); ``` Fix 2 (DNS rebinding — defense-in-depth): Update all callers to capture `$resolvedIP` and pass it to a DNS-pinning-aware fetch function using `CURLOPT_RESOLVE`. Credit Kai Aizen

Related

Alias · CVE (1)

  • CVE-2026-43884 WWBN AVideo is an open source video platform. vulnerability

Weakness · CWE (1)

  • CWE-918 Server-Side Request Forgery weakness

References