CVE-2021-23562: Plupload Code Injection Vulnerability

MODERATE
Advisory Identifier: GHSA-rp2c-jrgp-cvr8
CVSS 4.2
CWE-434 CWE-75
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2021-23562
GHSA Identifier GHSA-rp2c-jrgp-cvr8
Severity MODERATE
CVSS v3.1 Base Score 4.2
CWE Classification CWE-434: Unrestricted Upload of File with Dangerous Type
Affected Product Plupload
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (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.

plupload fixed: 2.3.9
npm install plupload@2.3.9
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 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

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.

CVE-2021-23562 Affected Plupload Versions

1 component(s)
Fixed Versions:
2.3.9
Product / Package Ecosystem Affected Versions Fixed Version
plupload
npm
< 2.3.9
2.3.9

References

Frequently Asked Questions

What is CVE-2021-23562?
CVE-2021-23562 is a security vulnerability in Plupload involving Code injection in plupload under CWE-434: Unrestricted Upload of File with Dangerous Type.
Which Plupload versions are affected?
Affected versions include releases prior to 2.3.9 across affected packages: plupload.
What version fixes CVE-2021-23562?
Upgrading to 2.3.9 (or the latest patched release for your respective branch) resolves the vulnerability.
Is plupload affected?
Yes, plupload is affected in releases prior to 2.3.9. Upgrade your dependency to 2.3.9 or later.
What is the CVSS score of CVE-2021-23562?
CVE-2021-23562 has a CVSS v3.1 base score of 4.2 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2021-23562?
CVE-2021-23562 is classified under CWE-434: Unrestricted Upload of File with Dangerous Type (The product allows the upload or transfer of dangerous file types that are automatically processed within its environment.).
How can I check npm dependencies for CVE-2021-23562?
Run the dependency tree command: 'npm ls plupload'. 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-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"
  }
}