RSSHub: Server-Side Request Forgery in the /discuz and /yna Routes

An anonymous caller passes a full URL to the /discuz route or replaces the target host through the lang parameter of the /yna route; the RSSHub server then fetches internal addresses.

Advisory ID: TP-2026-161
Product: RSSHub (open-source generator of RSS feeds from websites)
Vulnerability type: Server-side request forgery (CWE-918)
CVE: not requested
CVSS 3.1: 6.5 (Medium)
Affected versions: revisions before commit 66ca147d7b (verified live: commit aa46e60, image diygod/rsshub:latest)
Fixed in: commit 66ca147d7b, contained from tag v2026.10.09-0b0a0c3 onward
Reported: 27 June 2026

Summary

RSSHub generates RSS feeds from websites and fetches third-party pages on the server side to do so; routes that accept a freely chosen domain are otherwise locked behind the option ALLOW_USER_SUPPLY_UNSAFE_DOMAIN. Two routes had no such lock. /discuz/:link{.+} treats the entire remaining path as the URL to fetch, and /yna/:lang places the lang parameter as the first label in front of a fixed hostname, so a value such as 172.17.0.1:9971# replaces the host entirely. Both routes are reachable without authentication in the default configuration. An anonymous caller makes the RSSHub server send requests to arbitrary internal hosts and ports and reads the content of internal HTTP pages in the generated feed through /discuz.

Root cause

Line numbers refer to commit aa46e60: the Discuz route declares, among others, the path /:link{.+} (lib/routes/discuz/discuz.ts:81), reads link with ctx.req.param('link') (lib/routes/discuz/discuz.ts:88) and fetches the value unchecked with fetchWithAntiBot(link, header) (lib/routes/discuz/discuz.ts:102).
The cookie check applies only with the path segment cid: without cid, cookie is the empty string and the ConfigNotFoundError is skipped (lib/routes/discuz/discuz.ts:93-94).
The Yna route reads lang with ctx.req.param('lang') (lib/routes/yna/index.ts:51), builds https://${lang}.yna.co.kr/RSS/${channel}.xml from it (lib/routes/yna/index.ts:59) and passes the URL to parser.parseURL(url) (lib/routes/yna/index.ts:63).
ctx.req.param returns the value URL-decoded, so a # ends the host part and the fixed remainder .yna.co.kr/RSS/... becomes the fragment.
Comparable routes check the parameter with isValidHost or an allow-list or require ALLOW_USER_SUPPLY_UNSAFE_DOMAIN, for example lib/routes/wordpress/index.ts; these two routes lacked every one of those checks.

Proof of Concept

GET /discuz/http://172.17.0.1:9887/forum HTTP/1.1

HTTP/1.1 200
... <title>DISCUZ_INTERNAL_SECRET_9f3a_REFLECTED_TITLE</title> ...

GET /yna/172.17.0.1%3A9971%23/news HTTP/1.1

Verified on commit aa46e60 in Docker with the default configuration and no access key. A test server on 172.17.0.1:9887 logged GET /forum and GET /thread1 from the RSSHub container (172.17.0.2), and the title of the internal page appeared in the delivered feed; /discuz returns content when the target serves HTML in Discuz structure, otherwise the request stays blind. For /yna, a listener on 172.17.0.1:9971 recorded the TLS handshake from the container; that route speaks HTTPS only.

Impact

  • Requests from the RSSHub server to arbitrary hosts and ports on the internal network without authentication, usable for probing internal services.
  • /discuz speaks plain HTTP and therefore reaches loopback services and cloud metadata endpoints directly; in the test a stand-in service received the request for the path /latest/meta-data/iam/security-credentials/role.
  • Responses of internal HTTP pages in Discuz structure appear in the generated feed and are readable by the caller.

References

Is Something Like This in Your Software?

Our team found this vulnerability during its work. Have your applications tested by the same specialists, with a penetration test from turingpoint.