CVE-2021-21278: Rsshub Risk Of Code Injection Vulnerability
HIGHCVE-2021-21278 is a HIGH (CVSS 8.6) risk of code injection vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Rsshub libraries in the npm ecosystem. The issue involves risk of code injection. Remediation is available in the latest vendor maintenance releases.
CVE-2021-21278 at a Glance
Security Impact
CVSS: 8.6
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:C/C:H/I:N/A:N).
How to Fix CVE-2021-21278
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.
npm install rsshub@Latest secure release
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-2021-21278, 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 the patched release), 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-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), where the product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. 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
CVE-2021-21278 Affected Rsshub Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
rsshub
|
npm |
≤ 1.0.0
|
|
References
Frequently Asked Questions
What is CVE-2021-21278?
Which Rsshub versions are affected?
What version fixes CVE-2021-21278?
Is rsshub affected?
What is the CVSS score of CVE-2021-21278?
What CWE is associated with CVE-2021-21278?
How can I check npm dependencies for CVE-2021-21278?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pgjj-866w-fc5c",
"modified" : "2021-10-11T16:14:26Z",
"published" : "2021-10-12T16:03:43Z",
"aliases" : [ "CVE-2021-21278" ],
"summary" : "Risk of code injection",
"details" : "### Impact\nSome routes use `eval` or `Function constructor`, which may be injected by the target site with unsafe code, causing server-side security issues\n\n### Patches\nTemporarily removed the problematic route and added a `no-new-func` rule to eslint\nSelf-built users should upgrade to 7f1c430 and later as soon as possible\n\n### Credits\nTencent Woodpecker Security Team\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [https://github.com/DIYgod/RSSHub/issues](https://github.com/DIYgod/RSSHub/issues)\n* Email us at [i@diygod.me](mailto:i@diygod.me)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "rsshub"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "1.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/DIYgod/RSSHub/security/advisories/GHSA-pgjj-866w-fc5c"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-21278"
}, {
"type" : "WEB",
"url" : "https://github.com/DIYgod/RSSHub/commit/7f1c43094e8a82e4d8f036ff7d42568fed00699d"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/DIYgod/RSSHub"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/package/rsshub"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-74" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-10-11T16:14:26Z",
"nvd_published_at" : "2021-01-26T21:15:00Z"
}
}