CVE-2019-10747: Set value Prototype Pollution Vulnerability

CRITICAL
Advisory Identifier: GHSA-4g88-fppr-53pp
CVSS 9.8
CWE-1321
Published
Advisory Summary

CVE-2019-10747 is a CRITICAL (CVSS 9.8) prototype pollution vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Set value libraries in the npm ecosystem. The issue involves prototype pollution in set-value. Remediation is available by upgrading affected packages to version 2.0.1, 3.0.1.

CVE-2019-10747 at a Glance

CVE Identifier CVE-2019-10747
GHSA Identifier GHSA-4g88-fppr-53pp
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Affected Product Set value
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 9.8

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:H/I:H/A:H).

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 High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2019-10747

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

set-value fixed: 2.0.1
npm install set-value@2.0.1
set-value fixed: 3.0.1
npm install set-value@3.0.1
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 set-value

How to Check if You Are Affected

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

npm ls set-value

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

Note: The npm ls set-value 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 Set value, 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 `set-value` prior to 3.0.1 or 2.0.1 are vulnerable to Prototype Pollution. The `set` function fails to validate which Object properties it updates. This allows attackers to modify the prototype of Object, causing the addition or modification of an existing property on all objects. ## Recommendation If you are using `set-value` 3.x, upgrade to version 3.0.1 or later. If you are using `set-value` 2.x, upgrade to version 2.0.1 or later.

CVE-2019-10747 Affected Set value Versions

2 component(s)
Fixed Versions:
2.0.13.0.1
Product / Package Ecosystem Affected Versions Fixed Version
set-value
npm
< 2.0.1
2.0.1
set-value
npm
≥ 3.0.0
< 3.0.1
All 1 versions
3.0.0
3.0.1

References

Frequently Asked Questions

What is CVE-2019-10747?
CVE-2019-10747 is a security vulnerability in Set value involving Prototype Pollution in set-value under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').
Which Set value versions are affected?
Affected versions include releases prior to 2.0.1, 3.0.1 across affected packages: set-value.
What version fixes CVE-2019-10747?
Upgrading to 2.0.1, 3.0.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is set-value affected?
Yes, set-value is affected in releases prior to 2.0.1, 3.0.1. Upgrade your dependency to 2.0.1, 3.0.1 or later.
What is the CVSS score of CVE-2019-10747?
CVE-2019-10747 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2019-10747?
CVE-2019-10747 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-2019-10747?
Run the dependency tree command: 'npm ls set-value'. 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-4g88-fppr-53pp",
  "modified" : "2021-08-17T22:17:11Z",
  "published" : "2019-08-27T17:43:33Z",
  "aliases" : [ "CVE-2019-10747" ],
  "summary" : "Prototype Pollution in set-value",
  "details" : "Versions of `set-value` prior to 3.0.1 or 2.0.1 are vulnerable to Prototype Pollution. The `set` function fails to validate which Object properties it updates. This allows attackers to modify the prototype of Object, causing the addition or modification of an existing property on all objects.\n\n\n\n\n## Recommendation\n\nIf you are using `set-value` 3.x, upgrade to version 3.0.1 or later.\nIf you are using `set-value` 2.x, upgrade to version 2.0.1 or later.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "set-value"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "set-value"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.0.1"
      } ]
    } ],
    "versions" : [ "3.0.0" ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-10747"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jonschlinkert/set-value/commit/95e9d9923f8a8b4a01da1ea138fcc39ec7b6b15f"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jonschlinkert/set-value/commit/cb12f14955dde6e61829d70d1851bfea6a3c31ad"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/b46f35559c4a97cf74d2dd7fe5a48f8abf2ff37f879083920af9b292@%3Cdev.drat.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3EJ36KV6MXQPUYTFCCTDY54E5Y7QP3AV"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/E3HNLQZQINMZK6GYB2UTKK4VU7WBV2OT"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JS-SETVALUE-450213"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1012"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1321" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2019-08-27T17:24:50Z",
    "nvd_published_at" : null
  }
}