Skip to content

Cherry-pick 39a45121d: fix SSRF policy for media downloads#1396

Merged
alexey-pelykh merged 1 commit intomainfrom
cherry-pick/39a45121d-ssrf-media-policy
Mar 15, 2026
Merged

Cherry-pick 39a45121d: fix SSRF policy for media downloads#1396
alexey-pelykh merged 1 commit intomainfrom
cherry-pick/39a45121d-ssrf-media-policy

Conversation

@alexey-pelykh
Copy link
Copy Markdown

Cherry-pick of upstream 39a45121d.

Author: Sid-Qin

Upstream PR: openclaw#25475

Summary

  • Add SSRF policy for media downloads in Discord and Slack proxy environments
  • Prevents server-side request forgery when fetching media through proxy

Depends on #1395

🤖 Generated with Claude Code

…ronments (openclaw#25475)

* fix(discord,slack): add SSRF policy for media downloads in proxy environments

Discord and Slack media downloads (attachments, stickers, forwarded
images) call fetchRemoteMedia without any ssrfPolicy. When running
behind a local transparent proxy (Clash, mihomo, Shadowrocket) in
fake-ip mode, DNS returns virtual IPs in the 198.18.0.0/15 range,
which the SSRF guard blocks.

Add per-channel SSRF policy constants—matching the pattern already
applied to Telegram on main—that allowlist known CDN hostnames and
set allowRfc2544BenchmarkRange: true.

Refs openclaw#25355, openclaw#25322

Co-authored-by: Cursor <[email protected]>

* chore(slack): keep raw-fetch allowlist line anchors stable

---------

Co-authored-by: Cursor <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
(cherry picked from commit 39a4512)
@alexey-pelykh alexey-pelykh merged commit 55be17e into main Mar 15, 2026
7 checks passed
@alexey-pelykh alexey-pelykh deleted the cherry-pick/39a45121d-ssrf-media-policy branch March 15, 2026 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants