Summary
OpenClaw's Zalo plugin contains a server-side request forgery flaw in the sendPhoto function, where outbound photo URLs are not properly validated by the SSRF guard.
By supplying crafted photo URLs to the Zalo Bot API, an attacker can coerce the server into making arbitrary requests to internal endpoints, potentially exposing internal services and data.
Affected context
The vulnerability exists in OpenClaw deployments that use the Zalo plugin's sendPhoto function to fetch images from user-supplied URLs and forward them through the Zalo Bot API.
Because the SSRF guard is not properly applied to these outbound URLs, any environment where the OpenClaw server can reach internal networks, metadata services, or other protected endpoints may be exposed.
The risk increases when OpenClaw is deployed in cloud or containerized environments where internal services are addressable from the application host.
Exploit preconditions
- Attack surface: Zalo Bot API interface exposed by OpenClaw (e.g., bot commands, message handlers, or HTTP endpoints that accept photo URLs).
- Required access: Ability to invoke the Zalo plugin's sendPhoto function with a controllable photo URL parameter (such as sending crafted bot messages or API calls).
- Trigger point: When the application processes the sendPhoto request and performs an outbound HTTP(S) call to retrieve the specified photo.
- Why exploitation is possible: The SSRF guard does not fully validate or restrict the target URL, allowing requests to internal IP ranges, hostnames, or protocols that should not be reachable from the external interface.
Why this happens
This issue stems from incomplete or incorrectly applied validation on outbound URLs used by the sendPhoto function.
Instead of enforcing strict allowlists, normalization, and scheme/host checks, the SSRF guard fails to block attacker-controlled URLs that resolve to internal or otherwise sensitive endpoints.
Conceptually, this aligns with CWE-918: Server-Side Request Forgery, where an application acts as a proxy, issuing HTTP requests on behalf of an attacker to unintended destinations due to insufficient outbound request controls.
Potential impact
- Unauthorized access to internal HTTP services that are not directly exposed to the internet.
- Access to cloud or platform metadata services, which could reveal instance credentials or configuration data.
- Discovery of internal network structure through response behavior and timing.
- Potential interaction with internal admin panels, APIs, or debug endpoints that assume a trusted caller.
- Use of the application as a pivot point for further attacks or data exfiltration.
General mitigation guidance
Effective mitigation focuses on constraining outbound requests and reducing trust in user-supplied URLs:
- Apply strict allowlists for outbound destinations, limiting requests to known and intended image hosting domains.
- Normalize and rigorously validate URLs, including scheme, host, port, and path, before performing any outbound request.
- Block requests to private IP ranges, link-local addresses, loopback interfaces, and non-HTTP(S) schemes by default.
- Introduce a dedicated, limited egress network path for media retrieval, such as a proxy with enforced filtering rules.
- Use least-privilege networking and segmentation so the OpenClaw server cannot directly reach sensitive internal services.
How teams detect issues like this
Detection can rely on both code-centric and operational approaches:
- Static analysis: Look for outbound HTTP client usage (e.g., URL fetchers) that consume user-supplied URLs without robust allowlist checks or IP range filtering.
- Code review: Flag any feature that proxies or fetches remote resources based on user input, ensuring a consistent SSRF protection pattern is applied.
- Runtime monitoring: Inspect outbound traffic for unusual destinations, such as private IP ranges, loopback addresses, or cloud metadata endpoints.
- Policy enforcement: Use application security gateways or egress firewalls that enforce domain-level restrictions and block calls to non-approved endpoints.

