The vulnerability is a local file disclosure within the Feishu extension of OpenClaw, as described in GHSA-8jpq-5h99-ff5r. The root cause lies in the sendMediaFeishu function located in extensions/feishu/src/media.ts. This function was designed to handle both remote URLs and local file paths for media attachments.
Analysis of the fixing commit 5b4121d6011a48c71e747e3c18197f180b872c5d reveals that sendMediaFeishu used a helper function, isLocalPath, to distinguish between URLs and local paths. The logic in isLocalPath was flawed; it would incorrectly identify certain strings as local paths, for example, when it failed to parse a string as a valid URL. When isLocalPath returned true, sendMediaFeishu would proceed to read the provided path from the local filesystem using fs.readFileSync. This allowed an attacker to supply a path to a sensitive file (e.g., /etc/passwd) as the mediaUrl, causing the application to read and exfiltrate the file's contents.
The patch addresses this by completely removing the isLocalPath function and the corresponding file-reading logic from sendMediaFeishu. Instead, all media is now fetched through a hardened helper function, getFeishuRuntime().media.loadWebMedia, which is designed to prevent access to local files and internal network resources.
Additionally, the same commit hardened the downloadImage function in extensions/feishu/src/docx.ts, which was vulnerable to SSRF. While the primary reported vulnerability was LFD in sendMediaFeishu, this related fix indicates a broader effort to secure media handling in the extension.