The vulnerability stems from an inconsistent and decentralized approach to preventing Server-Side Request Forgery (SSRF) within the Microsoft Teams media fetching functionality of the openclaw package. The code utilized a mix of direct network calls (fetch) and a custom, plugin-local safeFetch function for security. This safeFetch function, along with its callers like fetchWithAuthFallback, was intended to validate requests but was not uniformly applied, allowing certain code paths to bypass these protections entirely. For instance, fetchGraphCollection and parts of downloadMSTeamsGraphMedia made direct network requests without proper validation.
The security patch addresses this by removing the localized and flawed safeFetch implementation and refactoring the code to use a centralized, shared SSRF guard model provided by the plugin-sdk. Specifically, vulnerable direct fetch calls were replaced with fetchWithSsrFGuard, and the custom authentication fetch logic was replaced by fetchWithBearerAuthScopeFallback. This ensures that all media-related outbound requests are subject to a consistent and robust set of security policies, primarily by validating hostnames against an allowlist and preventing requests to internal or reserved IP addresses, thus mitigating the SSRF risk.