CVE-2024-21489: Uplot UPlot Prototype Pollution Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-34q8-jcq6-mc37
CVSS 8.2
CWE-1321
Published
Advisory Summary

CVE-2024-21489 is a HIGH (CVSS 8.2) uplot prototype pollution vulnerability vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Uplot libraries in the npm ecosystem. The issue involves uplot prototype pollution vulnerability. Remediation is available by upgrading affected packages to version 1.6.31.

CVE-2024-21489 at a Glance

CVE Identifier CVE-2024-21489
GHSA Identifier GHSA-34q8-jcq6-mc37
Severity HIGH
CVSS v3.1 Base Score 8.2
CWE Classification CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Affected Product Uplot
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.2

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:N/I:H/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 None (C:N)
Integrity High (I:H)
Availability Low (A:L)

How to Fix CVE-2024-21489

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

uplot fixed: 1.6.31
npm install uplot@1.6.31
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 uplot

How to Check if You Are Affected

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

npm ls uplot

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

Note: The npm ls uplot 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-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In Uplot, 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

Versions of the package uplot before 1.6.31 are vulnerable to Prototype Pollution via the uplot.assign function due to missing check if the attribute resolves to the object prototype.

CVE-2024-21489 Affected Uplot Versions

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

References

Frequently Asked Questions

What is CVE-2024-21489?
CVE-2024-21489 is a security vulnerability in Uplot involving uPlot Prototype Pollution vulnerability under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').
Which Uplot versions are affected?
Affected versions include releases prior to 1.6.31 across affected packages: uplot.
What version fixes CVE-2024-21489?
Upgrading to 1.6.31 (or the latest patched release for your respective branch) resolves the vulnerability.
Is uplot affected?
Yes, uplot is affected in releases prior to 1.6.31. Upgrade your dependency to 1.6.31 or later.
What is the CVSS score of CVE-2024-21489?
CVE-2024-21489 has a CVSS v3.1 base score of 8.2 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L.
What CWE is associated with CVE-2024-21489?
CVE-2024-21489 is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') (The product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype.).
How can I check npm dependencies for CVE-2024-21489?
Run the dependency tree command: 'npm ls uplot'. 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-34q8-jcq6-mc37",
  "modified" : "2024-10-01T18:10:50Z",
  "published" : "2024-10-01T06:30:47Z",
  "aliases" : [ "CVE-2024-21489" ],
  "summary" : "uPlot Prototype Pollution vulnerability",
  "details" : "Versions of the package uplot before 1.6.31 are vulnerable to Prototype Pollution via the uplot.assign function due to missing check if the attribute resolves to the object prototype.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "uplot"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.6.31"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-21489"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/leeoniya/uPlot/commit/5756e3e9b91270b303157e14bd0174311047d983"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/leeoniya/uPlot"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/leeoniya/uPlot/blob/c52e5001c1d959a99ac495a53e4deca5c44464d2/src/utils.js#L437-L452"
  }, {
    "type" : "WEB",
    "url" : "https://security.snyk.io/vuln/SNYK-JS-UPLOT-6209224"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1321" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-10-01T18:10:50Z",
    "nvd_published_at" : "2024-10-01T05:15:12Z"
  }
}