Skip to content

Security: Unvalidated remote URL fetch from feed metadata (SSRF/internal network exposure)#579

Open
tuanaiseo wants to merge 1 commit into
brief-rss:masterfrom
tuanaiseo:contribai/fix/security/unvalidated-remote-url-fetch-from-feed-m
Open

Security: Unvalidated remote URL fetch from feed metadata (SSRF/internal network exposure)#579
tuanaiseo wants to merge 1 commit into
brief-rss:masterfrom
tuanaiseo:contribai/fix/security/unvalidated-remote-url-fetch-from-feed-m

Conversation

@tuanaiseo
Copy link
Copy Markdown

Problem

Favicon fetching uses feed-provided websiteURL to request documents and icons (XMLHttpRequest + fetch) without scheme/host validation. A malicious feed can force requests to internal hosts (e.g., localhost/intranet), turning the extension into a network probe and leaking request side effects.

Severity: medium
File: modules/favicon-fetcher.js

Solution

Validate and restrict URL schemes to http/https, block localhost/private IP ranges unless explicitly allowed, enforce size/time limits, and consider a denylist for sensitive endpoints (metadata services, loopback).

Changes

  • modules/favicon-fetcher.js (modified)

Testing

  • Existing tests pass
  • Manual review completed
  • No new warnings/errors introduced

Favicon fetching uses feed-provided `websiteURL` to request documents and icons (`XMLHttpRequest` + `fetch`) without scheme/host validation. A malicious feed can force requests to internal hosts (e.g., localhost/intranet), turning the extension into a network probe and leaking request side effects.

Affected files: favicon-fetcher.js

Signed-off-by: tuanaiseo <221258316+tuanaiseo@users.noreply.github.com>
@tanriol
Copy link
Copy Markdown
Member

tanriol commented Apr 7, 2026

Hello and sorry for the delay.

Could you please clarify what kind of side effects are meant? Why is the situation here different from a user visiting an HTML page that contains a <img src="http://localhost:1234/whatever.png"> (which, AFAIK, is allowed for compatibility reasons and unlikely to get forbidden)?

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