Skip to content

Remove feed from the default allowed protocols - #304

Merged
flavorjones merged 1 commit into
mainfrom
drop-feed-protocol
Jul 13, 2026
Merged

flavorjones merged 1 commit into
mainfrom
drop-feed-protocol

Conversation

@flavorjones

@flavorjones flavorjones commented Jul 13, 2026 •

Copy link
Copy Markdown
Owner

What problem is this PR intended to solve?

Loofah's default safelist allows the feed: URI scheme. The feed URI scheme was never accepted as a standard protocol, and no major browser supports it. Keeping it in the default allowlist creates a potential protocol smuggling vector in non-browser contexts such as webviews and email clients, where legacy handlers may process a URI nested after the scheme.

This PR removes feed from ACCEPTABLE_PROTOCOLS and adds a test asserting that feed: URIs are scrubbed.

Applications that rely on feed: links can restore the previous behavior by adding the scheme back to the safelist:

Loofah::HTML5::SafeList::ALLOWED_PROTOCOLS.add("feed")

Please note that this change hardens Loofah, but there is no known exploit that uses feed: and so it does not reach the threshold for a security advisory.

Thanks to hackerone researcher mk_security for raising this issue in a responsible manner.

The feed URI scheme was never accepted as a standard protocol and no
major browser supports it. Removing this rarely-used scheme reduces
attack surface in non-browser contexts (webviews, email clients) where
legacy handlers may process nested URIs.

https://en.wikipedia.org/wiki/Feed_URI_scheme
@flavorjones
flavorjones merged commit 5af0cba into main Jul 13, 2026
15 checks passed
@flavorjones
flavorjones deleted the drop-feed-protocol branch July 13, 2026 16:42
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