Skip to content

Guard the feed blocks' fetch: public addresses only, no redirects, a size limit - #13

Merged
do-io merged 1 commit into
mainfrom
fix/feed-url-ssrf
Oct 20, 2026
Merged

do-io merged 1 commit into
mainfrom
fix/feed-url-ssrf

Conversation

@do-io

@do-io do-io commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

The rss and dynamic_feed blocks fetched feed_url from the server with no check on where it pointed. They now go through OutboundUrlGuard:

  • the host must resolve only to public addresses (private, loopback, link-local including cloud metadata, carrier-grade NAT and reserved ranges are refused, IPv4 and IPv6, including integer, hex and IPv4-mapped forms);
  • the request is pinned to the checked address, follows no redirects, and has 3 s connect and 5 s total timeouts;
  • a response over mail-builder.feeds.max_bytes (default 1 MB) is ignored;
  • a refused or failed feed falls back to the block's own items, as before;
  • mail-builder.feeds.allowed_hosts lets a host through, for feeds served from your own network.

Tests: a table of refused URLs (nothing is sent), a public feed still works, redirects are not followed, size limit, allowed host, and the address classification. The test case binds a guard that never touches DNS. I also ran the real resolver against real names and the odd IP forms by hand.

README gets a short "Feed blocks" section. Needs a patch release (2.5.1) so that applications using the editor or the compiler get it.

🤖 Generated with Claude Code

…size limit

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@do-io
do-io merged commit d2fbd17 into main Oct 20, 2026
13 of 14 checks passed
@do-io
do-io deleted the fix/feed-url-ssrf branch October 21, 2026 19:25
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.

1 participant