-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Bug]: Feishu media fallback can expose local media references #98250
Copy link
Copy link
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Summary
Feishu media fallback paths can expose local or private media references to end users when upload/fetch fails. The affected paths include local-image auto-send fallback,
sendMediaupload fallback, document-comment media fallback, and reply-dispatcher media fallback for final voice/media replies.Real Environment Observed
openclaw/openclawmainextensions/feishu/src/outbound.tsextensions/feishu/src/reply-dispatcher.tsUser-Visible Symptom
If OpenClaw tries to send Feishu media from a host-local path, a
file://URL, a relative media reference, a loopback/private URL, or a hostname that resolves to a private address, an upload/fetch failure can degrade into a plain text fallback containing that raw reference.That can send values such as host temp paths, local filesystem paths, loopback URLs, or internal network media URLs to Feishu recipients instead of a safe failure message.
Source-Level Repro On Current Main
Current Feishu media fallback code appends the raw
mediaUrlinto user-visible text after a failed media send. The same class is reachable from multiple Feishu delivery surfaces:sendMediaFeishu(...)failure and fall through to normal text sending.sendMediafallback can append📎 ${mediaUrl}after upload failure.onErrorfallback can append the rawmediaUrlaftersendMediaWithLeadingCaption(...)catches media-send failure.Expected Behavior
Feishu fallback text should preserve the caption/reply text, but it should not send host-local paths,
file://URLs, relative references, loopback/private URLs, or DNS-private media URLs to recipients.Public
http://orhttps://URLs may remain available as fallback links only after they pass the shared SSRF/DNS policy.Actual Behavior
Raw media references can be sent as Feishu text/comment fallback when media upload or media fetch fails.
Scope / Non-Goals
Proposed Fix
Add a Feishu-local media fallback helper that:
http://orhttps://fallback links after shared SSRF/DNS validation;