Inverle dcec27c69d Add SSRF mitigations using filter_var and CURLOPT_RESOLVE (#8400)
* Add SSRF mitigations using `filter_var` and `CURLOPT_RESOLVE`
The idea is to prevent FreshRSS from sending any HTTP requests to internal services, except for the ones that are explicitly allowed in the config.

Based on 6e82b46a48/lib/filelib.php (L3818) and https://github.com/symfony/symfony/blob/8.1/src/Symfony/Component/HttpClient/NoPrivateNetworkHttpClient.php

https://github.com/FreshRSS/simplepie/pull/76
https://github.com/FreshRSS/simplepie/pull/78

* Add allowlist setting in Web UI

* make readme

* Update app/i18n/fr/admin.php

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>

* make readme again

* make readme

* Further work

Still WIP and needs testing etc.

* Readd previous if check for domain combination allowlist

* Turn POST to GET after redirect

* Improve

* Update config.default.php

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>

* make readme

* Skip SSRF check if `CURLOPT_PROXY` is set

* make readme

* Fix `!empty()` mistake

* Respect max redirects feed option when fetching with `httpGet()`

* Respect max redirects during SimplePie fetching + fix bypass

bypass fix: `CURLOPT_FOLLOWLOCATION` was moved below so that emulated redirects are enforced.

* Avoid FreshRSS and Minz code in SimplePie
https://github.com/FreshRSS/FreshRSS/pull/8400#discussion_r2935375980

* Corrected hook code

* phpdoc wrong return type

* Add CIDR support in allowlist

* Implement simple DNS caching

* Suppress `dns_get_record()` warnings

* A bit of proof-reading

* Minor typo

* Fix proxy logic

* Fix HTTP POST redirect logic

* Proofread checkCIDR
Add fixes for several situations

* Remove credentials from URL in logs

* Ensure `CURLOPT_FOLLOWLOCATION` is `false` by setting it at the end

* Fix codesniffer long line

* Fix potential bypass due to wrong return value

If there were no records returned by `dns_get_record()`, no overrides to `CURLOPT_RESOLVE` would get passed,
and a potential bypass could occur, when cURL would try to resolve the domain by itself.

* Put the URL at the end in logs

* Add documentation and environment variable support

* make readme

* Fix wrong behavior in case of IP

* Fix duplicate selector in CSS

* Minor type check change

* i18n fr, en

* Minor type check change

* Fix whitespace i18n fr

* make fix-all

* Fix `$ips_ok` not being returned after domain records were cached

* make readme

* PHPStan fix

* make readme

* Minor syntax in SimplePie

* Only return `null` if no allowed IPs were found

* Add wildcard *, help message

* Consistent docs with help message

* i18n: pl

* SimplePie compatibility PHP 7.2

* make fix-all

* Sync SimplePie
* https://github.com/FreshRSS/simplepie/pull/76

* 💥 Breaking change in the Changelog

* Document `INTERNAL_HOST_ALLOWLIST` in Docker docs

* Remove `Cookie` and `Authorization` headers in `httpGet()` during cross-origin redirect

* Minor whitespace
And same comment convention than below

* Remove authentication headers and change POST to GET on redirect in SimplePie

* Remove .local in Docker example

* Fill in default ports when comparing URL origins

* Remove .local from other places than the Docker example

* Rewrite WebSub subscribe to use `httpGet()`

* make fix-all

* Also unset `CURLOPT_USERPWD` during redirects

* phpcs fix

* Always unset `CURLOPT_FOLLOWLOCATION`

* Bump SimplePie
https://github.com/FreshRSS/simplepie/pull/78

* Update logic for CURLOPT_FOLLOWLOCATION

* Fix PHPStan

* Changelog fix security section

* Update most common RSS Bridge case
https://hub.docker.com/r/rssbridge/rss-bridge

* Replace misleading 127.0.0.1:8080 example for Docker
This does not make sense for a Docker container

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2026-06-28 18:51:04 +02:00
2026-06-20 08:31:46 +02:00
2025-08-01 08:30:49 +02:00
2025-12-05 22:20:57 +01:00
2022-06-19 20:03:17 +02:00
2019-07-23 10:01:52 +02:00
2021-10-21 11:44:03 +02:00
2026-06-11 22:19:55 +02:00
2026-05-20 20:00:46 +02:00
2024-08-04 19:40:14 +02:00
2015-10-25 00:01:13 +02:00
2018-12-22 11:39:08 +01:00

Liberapay donations

FreshRSS

FreshRSS is a self-hosted RSS feed aggregator.

It is lightweight, easy to work with, powerful, customizable, and has been translated into many languages.

It is a multi-user application with an anonymous reading mode. It supports custom tags. There is an API for (mobile) clients, and a Command-Line Interface.

Thanks to the WebSub standard, FreshRSS is able to receive instant push notifications from compatible sources, such as Friendica, WordPress, Blogger, Medium, etc.

FreshRSS natively supports basic Web scraping, based on XPath, for Web sites not providing any RSS / Atom feed. Also supports JSON documents.

FreshRSS offers the ability to reshare selections of articles by HTML, RSS, and OPML.

Different login methods are supported: Web form (including an anonymous option), HTTP Authentication (compatible with proxy delegation), OpenID Connect.

Finally, FreshRSS supports extensions for further tuning.

FreshRSS logo

Feedback and contributions

Feature requests, bug reports, and other contributions are welcome. The best way is to open an issue on GitHub. We are a friendly community.

To facilitate contributions, the following option is available:

Open in GitHub Codespaces

Screenshot

FreshRSS screenshot

Disclaimer

FreshRSS comes with absolutely no warranty.

Documentation

Requirements

  • A recent browser like Firefox / IceCat, Edge, Chromium / Chrome, Opera, Safari.
    • Works on mobile (except a few features)
  • Light server running Linux or Windows
    • It even works on Raspberry Pi 1 with response time under a second (tested with 150 feeds, 22k articles)
  • A Web server: Apache2.4+ (recommended), nginx, lighttpd (not tested on others)
  • PHP 8.1+
  • PostgreSQL 10+ or SQLite or MariaDB 10.6+ or MySQL 8.0+

Installation

The latest stable release can be found on GitHub. New versions are released every two to three months.

If you want a rolling release with the newest features, or want to help testing or developing the next stable version, you can use the edge branch.

Automated install

Docker YunoHost Elestio
Cloudron PikaPods Zeabur
ClawCloud Hostinger

Manual install

  1. Get FreshRSS with git or by downloading the archive
  2. Put the application somewhere on your server (expose only the ./p/ folder to the Web)
  3. Add write access to the ./data/ folder for the webserver user
  4. Access FreshRSS with your browser and follow the installation process
  5. Everything should be working :) If you encounter any problems, feel free to contact us.
  6. Advanced configuration settings can be found in config.default.php and modified in data/config.php.
  7. When using Apache, enable AllowEncodedSlashes for better compatibility with mobile clients.

More detailed information about installation and server configuration can be found in our documentation.

Advice

  • For better security, expose only the ./p/ folder to the Web.
    • Be aware that the ./data/ folder contains all personal data, so it is a bad idea to expose it.
  • The ./constants.php file defines access to the application folder. If you want to customize your installation, look here first.
  • If you encounter any problem, logs are accessible from the interface or manually in ./data/users/*/log*.txt files.
    • The special folder ./data/users/_/ contains the part of the logs that are shared by all users.

FAQ

  • The date and time in the right-hand column is the date declared by the feed, not the time at which the article was received by FreshRSS, and it is not used for sorting.
    • In particular, when importing a new feed, all of its articles will appear at the top of the feed list regardless of their declared date.

Extensions

FreshRSS supports further customizations by adding extensions on top of its core functionality. See the repository dedicated to those extensions.

Internationalization: 20+ languages. Translation progress

Language Progress
Čeština (cs) ■■■■■■■■・・ 81% contribute
Deutsch (de) ■■■■■■■■■・ 99% contribute
Ελληνικά (el) ■■■・・・・・・・ 38% contribute
English (en) ■■■■■■■■■■ 100% contribute
English (United States) (en-US) ■■■■■■■■■■ 100% contribute
Español (es) ■■■■■■■■■・ 99% contribute
فارسی (fa) ■■■■■■■■■・ 99% contribute
Suomi (fi) ■■■■■■■■■・ 92% contribute
Français (fr) ■■■■■■■■■■ 100% contribute
עברית (he) ■■■■・・・・・・ 41% contribute
Magyar (hu) ■■■■■■■■■・ 99% contribute
Bahasa Indonesia (id) ■■■■■■■■・・ 89% contribute
Italiano (it) ■■■■■■■■■・ 99% contribute
日本語 (ja) ■■■■■■■■・・ 88% contribute
한국어 (ko) ■■■■■■■■・・ 81% contribute
Latviešu (lv) ■■■■■■■■・・ 82% contribute
Nederlands (nl) ■■■■■■■■■・ 99% contribute
Occitan (oc) ■■■■■■■・・・ 74% contribute
Polski (pl) ■■■■■■■■■・ 99% contribute
Português (Brasil) (pt-BR) ■■■■■■■■■・ 99% contribute
Português (Portugal) (pt-PT) ■■■■■■■■・・ 81% contribute
Русский (ru) ■■■■■■■■■・ 99% contribute
Slovenčina (sk) ■■■■■■■■・・ 81% contribute
Türkçe (tr) ■■■■■■■■・・ 89% contribute
Українська (uk) ■■■■■■■■■・ 99% contribute
简体中文 (zh-CN) ■■■■■■■■■・ 97% contribute
正體中文 (zh-TW) ■■■■■■■■■・ 95% contribute

APIs & native apps

FreshRSS supports access from mobile / native apps for Linux, Android, iOS, Windows and macOS, via two distinct APIs: Google Reader API (best), and Fever API (limited features, less efficient, less safe).

App Platform Free Software Maintained & Developed API Works offline Fast sync Fetch more in individual views Fetch read articles Favourites Labels Podcasts Manage feeds
Capy Reader Android ✓✓ GReader
Readrops Android ✓✓ GReader
FeedMe Android ✓✓ GReader
FocusReader Android ✓✓ GReader
Read You Android ✓✓ GReader
Your News Android, iOS ✓✓ GReader
Fluent Reader Lite Android, iOS GReader
FeedFlow Android, iOS, Linux, macOS, Windows ✓✓ GReader ? ? ? ?
FriRSS Web (self-hosted) ✓✓ GReader ?
App Platform Free Software Maintained & Developed API Works offline Fast sync Fetch more in individual views Fetch read articles Favourites Labels Podcasts Manage feeds
Fluent Reader Windows, Linux, macOS ✓✓ GReader
RSS Guard Windows, GNU/Linux, macOS, OS/2 ✓✓ GReader
NewsFlash GNU/Linux ✓✓ GReader
Newsboat GNU/Linux, macOS, FreeBSD ✓✓ GReader
FluentFlame Reader Windows, Linux, macOS Work in progress GReader ? ? ?
App Platform Free Software Maintained & Developed API Works offline Fast sync Fetch more in individual views Fetch read articles Favourites Labels Podcasts Manage feeds
Vienna RSS macOS ✓✓ GReader ? ? ? ? ? ? ? ?
Readkit iOS, macOS ✓✓ GReader $
Reeder Classic iOS, macOS ✓✓ GReader
lire iOS, macOS ✓✓ GReader ? ? ? ? ? ? ? ?
Unread iOS ✓✓ Fever ? ? ?
Fiery Feeds iOS ✓✓ Fever ? ? ? ? ?
Netnewswire iOS, macOS Work in progress GReader ? ? ? ?

Included libraries

Additional credits

Alternatives

If FreshRSS does not suit you for one reason or another, here are alternative solutions to consider:

Description
No description provided
Readme 107 MiB
Languages
PHP 80.3%
CSS 10.1%
HTML 7%
JavaScript 2.3%
Shell 0.1%
Other 0.1%