Summary
A Server-Side Request Forgery (SSRF) flaw in AVideo's public thumbnail endpoints allows attackers to coerce the server into issuing HTTP requests to arbitrary URLs, including internal-only addresses.
Because the endpoints accept attacker-controlled URLs with minimal validation and no authentication, an attacker can probe internal services and cloud metadata endpoints via the AVideo server, even though the responses are not directly exposed.
Affected context
This vulnerability affects AVideo instances using the public thumbnail endpoints:
getImage.phpgetImageMP4.php
In vulnerable versions, these endpoints:
- Are exposed without authentication
- Accept a
base64Urlquery parameter that encodes an arbitrary HTTP/HTTPS URL - Only validate that the URL is syntactically valid and begins with
http://orhttps:// - Pass the decoded URL directly to
ffmpegas an input source
In deployments where the AVideo server can reach internal networks (e.g., RFC1918 ranges, loopback addresses) or cloud provider metadata services, this configuration becomes risky because the server's network position is more privileged than an external client.
Exploit preconditions
- Attack surface: Publicly reachable AVideo web endpoints (
getImage.php,getImageMP4.php) - Required access: Network access to the AVideo HTTP(S) interface; no login or authentication required
- Input control: Ability to supply an attacker-chosen
base64Urlparameter that decodes to a target HTTP/HTTPS URL - Network positioning: AVideo server has connectivity to internal services (e.g.,
127.0.0.1,192.168.x.x,10.x.x.x) or cloud instance metadata IPs (e.g.,169.254.169.254) - Trigger point: Requesting a crafted thumbnail URL causes
ffmpegto fetch video/thumbnail content from the attacker-specified URL - Why exploitation is possible: URL validation only checks syntax and scheme, not destination or network segment, and no authentication or allowlist restricts reachable hosts, enabling the server to be abused as a proxy to internal resources.
Why this happens
The core issue is an SSRF pattern where user-controlled URLs are used by the server to initiate outbound HTTP requests without sufficient destination controls.
In this case:
- The application decodes
base64Urland assumes that any syntactically validhttp(s)://URL is safe. - The decoded URL is passed directly to
ffmpeg, which retrieves media from that location. - There is no enforcement of host allowlists, IP range blocking, or separation of internal and external address spaces.
This matches CWE-918: Server-Side Request Forgery, where a web application uses attacker-supplied URLs to interact with remote resources, unintentionally exposing internal services from a more privileged network context.
Potential impact
- Discovery and probing of internal HTTP services that are not directly exposed to the internet
- Access to cloud provider metadata endpoints (e.g., AWS
169.254.169.254/latest/meta-data/), which may lead to exposure of instance metadata and potentially access tokens - Mapping of reachable internal IP ranges through timing differences, failures, and error behavior (blind SSRF reconnaissance)
- Indirect assistance in chaining further attacks, such as pivoting into internal APIs or management interfaces accessible only from the server
- Potential exfiltration of sensitive configuration data or service responses if logs, side-channels, or other application behavior leak response details
General mitigation guidance
Effective mitigation centers on treating outbound requests based on user-controlled URLs as highly untrusted and constraining where the server is allowed to connect.
Common defensive patterns include:
- Network egress restrictions:
- Use firewall rules or outbound ACLs to prevent the web server from reaching internal segments, loopback addresses, and metadata IPs from web-facing processes.
- URL destination hardening:
- Enforce allowlists of trusted domains or CDNs for any media-fetching functionality.
- Resolve hostnames and verify that the resulting IPs are not in private, loopback, link-local, or metadata ranges before issuing requests.
- Application-level validation:
- Reject URLs pointing to bare IP addresses or non-public address ranges where feasible.
- Normalize URLs and re-validate after DNS resolution to mitigate DNS rebinding-style issues.
- Component isolation:
- Run media processing (like
ffmpeg) in a sandboxed environment with restricted network access, such as a container or separate microservice with tightly scoped egress rules. - Least privilege and secure defaults:
- Default configuration should assume URLs are untrusted, restricting outbound connectivity by default and requiring explicit opt-in for new external targets.
How teams detect issues like this
Detection focuses on identifying both the code patterns that enable SSRF and the runtime behavior indicative of abuse.
Possible strategies include:
- Static analysis and code review:
- Search for areas where user input is passed into URL handlers, HTTP clients, or shell-escaped arguments for tools like
ffmpegwithout host validation or allowlists. - Look for
FILTER_VALIDATE_URL-style checks that validate only format and scheme but not destination or IP ranges. - Flag endpoints that accept encoded URLs (e.g., Base64) and directly feed them into networked tools.
- Automated scanning and SAST tools:
- Configure SAST rules targeting common SSRF sinks (HTTP clients, network libraries, command-line tools that fetch remote resources).
- Use security linters and CI hooks to block introduction of new external-call paths based on untrusted URLs.
- Runtime monitoring:
- Monitor outbound HTTP traffic from web servers or media workers for unusual destinations, especially requests to RFC1918/loopback/metadata addresses.
- Analyze error logs for repeated failures or timeouts on thumbnail or media processing endpoints that may indicate SSRF probing.
- Operational policies:
- Require architectural reviews for new features that perform server-initiated network calls based on user input.

