Summary
WWBN AVideo versions up to and including 29.0 contain a server-side request forgery (SSRF) weakness where user-supplied URLs are validated only before the first request, but automatic HTTP redirect following is left enabled.
An attacker can point the application at a controlled URL that responds with a 302 redirect to internal or cloud-metadata endpoints, allowing indirect access to internal network resources and sensitive metadata that the attacker could not normally reach.
Affected context
This issue affects AVideo deployments that expose:
- The
plugin/AI/receiveAsync.json.phpendpoint, and/or - The
objects/EpgParser.phpendpoint
and that allow these endpoints to make outbound HTTP requests based on user-supplied URLs.
The vulnerability arises when:
- The application validates only the initial URL using
isSSRFSafeURL(), and - The subsequent fetch uses
file_get_contents()with PHP's default redirect-following behavior enabled.
In such configurations, internal HTTP endpoints reachable from the AVideo server—such as cloud instance metadata services or internal APIs—may become indirectly accessible through attacker-controlled redirects.
Exploit preconditions
- Attack surface: Publicly accessible HTTP(S) endpoints in AVideo that accept user-controlled URLs, specifically:
plugin/AI/receiveAsync.json.phpobjects/EpgParser.php- Required access: Ability to send crafted HTTP requests to these endpoints; no direct access to the internal network is required.
- Trigger point: The application performing
file_get_contents()on an attacker-supplied URL that returns an HTTP redirect (e.g., 302, 301) to an internal or metadata service URL. - Why exploitation is possible: The SSRF guard (
isSSRFSafeURL()) inspects only the original URL. Whenfile_get_contents()automatically follows redirects, the redirect target is never re-validated, allowing the request to escape the intended URL safety constraints and reach restricted internal addresses.
Why this happens
The underlying issue is an incomplete SSRF defense that assumes validating the initial URL is sufficient, while overlooking the HTTP redirect behavior of the HTTP client.
The code pattern is:
- Accept a user-supplied URL.
- Pass it through
isSSRFSafeURL()for basic validation. - Fetch it with
file_get_contents()without disabling automatic redirect following or re-validating the redirect destination.
This maps to CWE-918: Server-Side Request Forgery (SSRF), where a server-side component can be coerced into making arbitrary network requests. Here, the component effectively becomes a proxy that can be steered by untrusted input, with redirects expanding the reachable target set beyond what the initial validation covers.
Potential impact
- Access to cloud instance metadata services (e.g.,
169.254.169.254) which may expose: - Access tokens or credentials
- Instance configuration and identity documents
- Interaction with internal HTTP services not exposed to the public internet, such as:
- Internal admin panels or APIs
- Service discovery endpoints
- Configuration or secrets management APIs reachable via HTTP
- Use of the application server as a pivot point for further reconnaissance of internal networks.
- Possible escalation of privileges if retrieved credentials or tokens are reused in other services.
- Indirect data exfiltration from internal endpoints that return sensitive information in HTTP responses.
General mitigation guidance
Effective mitigation focuses on constraining when and how server-side components make outbound requests influenced by user input, and on neutralizing redirect-based bypasses:
- Harden URL fetching logic:
- Disable automatic redirect following in HTTP clients when the initial URL is based on untrusted data.
- If redirects must be supported, re-apply SSRF and allowlist checks to each redirect target before following it.
- Apply strict network-level controls:
- Use firewall rules or outbound egress policies to block the application server from reaching sensitive address ranges (e.g.,
169.254.169.254, RFC1918 ranges, internal service CIDRs) unless explicitly required. - Segment access so web-facing components cannot directly reach critical management or metadata endpoints.
- Enforce strong allowlisting:
- Limit outbound requests to a curated set of hostnames or domains rather than validating arbitrary URLs.
- Resolve DNS server-side and verify that resolved IPs are within expected ranges before connecting.
- Reduce trust in user-controlled URLs:
- Avoid using raw user-supplied URLs for backend fetches; instead, map user choices to pre-approved resources or proxies with their own safeguards.
- Least privilege and defense in depth:
- Run the application with minimal network privileges and avoid assigning roles that grant powerful metadata-access-based credentials.
- Combine application-level validation with infrastructure controls so a single validation mistake does not expose sensitive networks.
How teams detect issues like this
Detecting SSRF and redirect-related weaknesses typically combines code-centric and infrastructure-centric approaches:
- Static analysis and code review:
- Search for use of
file_get_contents(), cURL, or similar HTTP APIs that operate on user-controllable URLs. - Flag patterns where:
- A URL is validated once and then passed to an HTTP client that follows redirects automatically.
- Validation functions do not consider redirects or resolved IP addresses.
- Review implementations of SSRF guards (e.g.,
isSSRFSafeURL()) to ensure they: - Handle edge cases (redirects, DNS rebinding, encoded URLs).
- Are consistently applied across all URL-fetching code paths.
- Automated policy enforcement:
- Integrate secure coding rules into CI pipelines to prevent new usages of raw HTTP clients on untrusted URLs without redirect and allowlist controls.
- Use security linters or SAST tools configured with SSRF-specific rules.
- Runtime monitoring and logging:
- Log outbound HTTP requests, including target URLs and resolved IP addresses, especially requests to link-local or internal IP ranges.
- Set up alerts for requests to known-sensitive addresses (e.g., metadata endpoints) originating from web application processes.
- Testing and security assessments:
- Include SSRF test cases in penetration tests and QA, focusing on redirect chains and metadata service access.
- Use internal security testing tools that try to coerce the application into contacting controlled endpoints via redirects.

