Repository navigation
v2.4.1 — Security Patch (SSRF Fix)
🔒 Security Patch — SSRF Fix
Critical security fix for unauthenticated Server-Side Request Forgery (SSRF) in the stream proxy endpoints.
🛡️ Security
- CRITICAL: Fixed unauthenticated SSRF in
/api/stream/proxyand/api/stream/ts-proxy- The proxy endpoint domain allowlist had an escape hatch (
pathname.endsWith(".m3u8")) that let any host through as long as the path looked like a playlist /api/stream/ts-proxyhad no destination check at all — the URL went straight toaxios.get- Both could be used to fetch internal services (127.0.0.1, 169.254.169.254) and read responses
- The proxy endpoint domain allowlist had an escape hatch (
- Added shared
streamProxy.helper.jswith:- Real allowlist by registrable domain (subdomains covered)
- Private/loopback/link-local/CGNAT address blocking as second layer
- HTTPS-only scheme enforcement
- Removed dead domain
megaplay-1.buzzfrom allowlist - Added
vid-tube.siteand CDNs currently serving streams (norami.top,kryntal.top,akirax.buzz) - Added
SECURITY.mdwith vulnerability reporting policy
🐛 Fixed
- Environment loading: Fixed
dotenv.config()being called after static imports — helpers readingprocess.envat module top level (mirror, cache, proxy, streamProxy) were never receiving.envvalues. Changed toimport "dotenv/config"as the first import so.envis populated before any helper module loads- Affected settings:
MIRROR_DOMAINS,MIRROR_CACHE_TTL,CACHE_MAX_SIZE,CACHE_DEFAULT_TTL,SCRAPER_API_KEY,FLARESOLVERR_URL,STREAM_PROXY_DOMAINS,STREAM_PROXY_REFERER
- Affected settings:
✨ Added
- Stream Proxy Allowlist Config: New
STREAM_PROXY_DOMAINSenv var to override the built-in domain allowlist (comma-separated) - Stream Proxy Referer Config: New
STREAM_PROXY_REFERERenv var to override the Referer header sent to stream CDNs (default:https://megaplay.buzz/) - Maintenance Badge: Added to README
- Security Contributors: Credit to @jamil182 in README and CHANGELOG
🧪 Tests
- Marked upstream-dependent tests (Servers, Stream Resolve, Upcoming, Top Rankings, Recently Updated, Completed, Status, OpenAPI) as
optional: true— they skip gracefully when the scraping target blocks requests
📦 Files Changed
| File | Change |
|---|---|
src/helper/streamProxy.helper.js |
New — SSRF guard with allowlist + private IP blocking |
SECURITY.md |
New — vulnerability reporting policy |
server.js |
dotenv load order fix |
src/routes/apiRoutes.js |
Proxy validation using shared guard |
test.js |
Upstream-dependent tests marked optional |
.env.example |
New config vars documented |
package.json |
Version 2.4.0 → 2.4.1 |
README.md |
Maintenance badge + security credits |
CHANGELOG.md |
v2.4.1 entry |
docs/*.md |
Version references updated |
🙏 Credits
Thanks to @jamil182 for discovering and fixing this vulnerability, and for the security policy.
Full Changelog: 2.4.0...v2.4.1