CVE-2021-23562: Plupload Code Injection Vulnerability
MODERATECVE-2021-23562 is a MODERATE (CVSS 4.2) code injection vulnerability (CWE-434: Unrestricted Upload of File with Dangerous Type) affecting Plupload libraries in the npm ecosystem. The issue involves code injection in plupload. Remediation is available by upgrading affected packages to version 2.3.9.
CVE-2021-23562 at a Glance
Security Impact
CVSS: 4.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N).
How to Fix CVE-2021-23562
To remediate this vulnerability, upgrade all affected Plupload 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 plupload@2.3.9
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls plupload
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2021-23562, inspect your project dependencies using npm:
npm ls plupload
Analyze the terminal output to locate any version of Plupload in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.3.9), your application is affected.
Note: The npm ls plupload 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-434: Unrestricted Upload of File with Dangerous Type, where the product allows the upload or transfer of dangerous file types that are automatically processed within its environment. In Plupload, 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-23562 Affected Plupload Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
plupload
|
npm |
< 2.3.9
|
2.3.9
|
References
Frequently Asked Questions
What is CVE-2021-23562?
Which Plupload versions are affected?
What version fixes CVE-2021-23562?
Is plupload affected?
What is the CVSS score of CVE-2021-23562?
What CWE is associated with CVE-2021-23562?
How can I check npm dependencies for CVE-2021-23562?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rp2c-jrgp-cvr8",
"modified" : "2021-12-06T22:08:43Z",
"published" : "2021-12-16T15:32:31Z",
"aliases" : [ "CVE-2021-23562" ],
"summary" : "Code injection in plupload",
"details" : "This affects the package plupload before 2.3.9. A file name containing JavaScript code could be uploaded and run. An attacker would need to trick a user to upload this kind of file.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "plupload"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.3.9"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-23562"
}, {
"type" : "WEB",
"url" : "https://github.com/moxiecode/plupload/commit/d12175d4b5fa799b994ee1bb17bfbeec55b386fb"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/moxiecode/plupload"
}, {
"type" : "WEB",
"url" : "https://github.com/moxiecode/plupload/blob/master/js/jquery.plupload.queue/jquery.plupload.queue.js%23L226"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARS-2306665"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWER-2306663"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWERGITHUBMOXIECODE-2306664"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-JS-PLUPLOAD-1583909"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-434", "CWE-75" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-12-06T22:08:43Z",
"nvd_published_at" : "2021-12-03T20:15:00Z"
}
}