CVE-2020-15256: Object path Prototype Pollution Vulnerability

HIGH
Advisory Identifier: GHSA-cwx2-736x-mf6w
CVSS 7.7
CWE-20 CWE-471
Published
Advisory Summary

CVE-2020-15256 is a HIGH (CVSS 7.7) prototype pollution vulnerability (CWE-20: Improper Input Validation) affecting Object path libraries in the npm ecosystem. The issue involves prototype pollution in object-path. Remediation is available by upgrading affected packages to version 0.11.5.

CVE-2020-15256 at a Glance

CVE Identifier CVE-2020-15256
GHSA Identifier GHSA-cwx2-736x-mf6w
Severity HIGH
CVSS v3.1 Base Score 7.7
CWE Classification CWE-20: Improper Input Validation
Affected Product Object path
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.7

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:N/S:U/C:L/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2020-15256

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

object-path fixed: 0.11.5
npm install object-path@0.11.5
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 object-path

How to Check if You Are Affected

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

npm ls object-path

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

Note: The npm ls object-path 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Object path, 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

### Impact A prototype pollution vulnerability has been found in `object-path` <= 0.11.4 affecting the `set()` method. The vulnerability is limited to the `includeInheritedProps` mode (if version >= 0.11.0 is used), which has to be explicitly enabled by creating a new instance of `object-path` and setting the option `includeInheritedProps: true`, or by using the default `withInheritedProps` instance. The default operating mode is not affected by the vulnerability if version >= 0.11.0 is used. Any usage of `set()` in versions < 0.11.0 is vulnerable. ### Patches Upgrade to version >= 0.11.5 ### Workarounds Don't use the `includeInheritedProps: true` options or the `withInheritedProps` instance if using a version >= 0.11.0. ### References [Read more about the prototype pollution vulnerability](https://codeburst.io/what-is-prototype-pollution-49482fc4b638) ### For more information If you have any questions or comments about this advisory: * Open an issue in [object-path](https://github.com/mariocasciaro/object-path)

CVE-2020-15256 Affected Object path Versions

1 component(s)
Fixed Versions:
0.11.5
Product / Package Ecosystem Affected Versions Fixed Version
object-path
npm
< 0.11.5
0.11.5

References

Frequently Asked Questions

What is CVE-2020-15256?
CVE-2020-15256 is a security vulnerability in Object path involving Prototype pollution in object-path under CWE-20: Improper Input Validation.
Which Object path versions are affected?
Affected versions include releases prior to 0.11.5 across affected packages: object-path.
What version fixes CVE-2020-15256?
Upgrading to 0.11.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is object-path affected?
Yes, object-path is affected in releases prior to 0.11.5. Upgrade your dependency to 0.11.5 or later.
What is the CVSS score of CVE-2020-15256?
CVE-2020-15256 has a CVSS v3.1 base score of 7.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:H.
What CWE is associated with CVE-2020-15256?
CVE-2020-15256 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check npm dependencies for CVE-2020-15256?
Run the dependency tree command: 'npm ls object-path'. 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-cwx2-736x-mf6w",
  "modified" : "2021-11-19T14:05:56Z",
  "published" : "2020-10-19T20:55:55Z",
  "aliases" : [ "CVE-2020-15256" ],
  "summary" : "Prototype pollution in object-path",
  "details" : "### Impact\nA prototype pollution vulnerability has been found in `object-path` <= 0.11.4 affecting the `set()` method. The vulnerability is limited to the `includeInheritedProps` mode (if version >= 0.11.0 is used), which has to be explicitly enabled by creating a new instance of `object-path` and setting the option `includeInheritedProps: true`, or by using the default `withInheritedProps` instance. The default operating mode is not affected by the vulnerability if version >= 0.11.0 is used. Any usage of `set()` in versions < 0.11.0 is vulnerable.\n \n### Patches\nUpgrade to version >= 0.11.5\n\n### Workarounds\nDon't use the `includeInheritedProps: true` options or the `withInheritedProps` instance if using a version >= 0.11.0.\n\n### References\n[Read more about the prototype pollution vulnerability](https://codeburst.io/what-is-prototype-pollution-49482fc4b638)\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [object-path](https://github.com/mariocasciaro/object-path)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "object-path"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.11.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/mariocasciaro/object-path/security/advisories/GHSA-cwx2-736x-mf6w"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-15256"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mariocasciaro/object-path/commit/2be3354c6c46215c7635eb1b76d80f1319403c68"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mariocasciaro/object-path"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20", "CWE-471" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-10-19T20:52:39Z",
    "nvd_published_at" : "2020-10-19T22:15:00Z"
  }
}