CVE-2023-45827: @clickbar/dot diver Prototype Pollution(PP) Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-9w5f-mw3p-pj47
CVSS 7.3
CWE-1321
Published
Advisory Summary

CVE-2023-45827 is a HIGH (CVSS 7.3) prototype pollution(pp) vulnerability vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting @clickbar/dot diver libraries in the npm ecosystem. The issue involves prototype pollution(pp) vulnerability in setbypath. Remediation is available by upgrading affected packages to version 1.0.2.

CVE-2023-45827 at a Glance

CVE Identifier CVE-2023-45827
GHSA Identifier GHSA-9w5f-mw3p-pj47
Severity HIGH
CVSS v3.1 Base Score 7.3
CWE Classification CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Affected Product @clickbar/dot diver
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.3

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

How to Fix CVE-2023-45827

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

@clickbar/dot-diver fixed: 1.0.2
npm install @clickbar/dot-diver@1.0.2
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 @clickbar/dot-diver

How to Check if You Are Affected

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

npm ls @clickbar/dot-diver

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

Note: The npm ls @clickbar/dot-diver 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 @clickbar/dot diver, 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

### Summary There is a Prototype Pollution(PP) vulnerability in dot-diver. It can leads to RCE. ### Details ```javascript //https://github.com/clickbar/dot-diver/tree/main/src/index.ts:277 // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access objectToSet[lastKey] = value ``` In this code, there is no validation for Prototpye Pollution. ### PoC ```javascript import { getByPath, setByPath } from '@clickbar/dot-diver' console.log({}.polluted); // undefined setByPath({},'constructor.prototype.polluted', 'foo'); console.log({}.polluted); // foo ``` ### Impact It is Prototype Pollution(PP) and it can leads to Dos, RCE, etc. ### Credits Team : NodeBoB 최지혁 ( Jihyeok Choi ) 이동하 ( Lee Dong Ha of ZeroPointer Lab ) 강성현    ( kang seonghyeun ) 박성진    ( sungjin park ) 김찬호    ( Chanho Kim ) 이수영    ( Lee Su Young ) 김민욱    ( MinUk Kim )

CVE-2023-45827 Affected @clickbar/dot diver Versions

1 component(s)
Fixed Versions:
1.0.2
Product / Package Ecosystem Affected Versions Fixed Version
@clickbar/dot-diver
npm
< 1.0.2
1.0.2

References

Frequently Asked Questions

What is CVE-2023-45827?
CVE-2023-45827 is a security vulnerability in @clickbar/dot diver involving Prototype Pollution(PP) vulnerability in setByPath under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').
Which @clickbar/dot diver versions are affected?
Affected versions include releases prior to 1.0.2 across affected packages: @clickbar/dot-diver.
What version fixes CVE-2023-45827?
Upgrading to 1.0.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @clickbar/dot-diver affected?
Yes, @clickbar/dot-diver is affected in releases prior to 1.0.2. Upgrade your dependency to 1.0.2 or later.
What is the CVSS score of CVE-2023-45827?
CVE-2023-45827 has a CVSS v3.1 base score of 7.3 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2023-45827?
CVE-2023-45827 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-2023-45827?
Run the dependency tree command: 'npm ls @clickbar/dot-diver'. 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-9w5f-mw3p-pj47",
  "modified" : "2023-11-06T19:34:19Z",
  "published" : "2023-11-03T19:03:40Z",
  "aliases" : [ "CVE-2023-45827" ],
  "summary" : "Prototype Pollution(PP) vulnerability in setByPath",
  "details" : "### Summary\nThere is a Prototype Pollution(PP) vulnerability in dot-diver. It can leads to RCE.\n\n### Details\n```javascript\n//https://github.com/clickbar/dot-diver/tree/main/src/index.ts:277\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n  objectToSet[lastKey] = value\n```\nIn this code, there is no validation for Prototpye Pollution.\n\n### PoC\n```javascript\nimport { getByPath, setByPath } from '@clickbar/dot-diver'\n\nconsole.log({}.polluted); // undefined\nsetByPath({},'constructor.prototype.polluted', 'foo');\nconsole.log({}.polluted); // foo\n```\n\n### Impact\nIt is Prototype Pollution(PP) and it can leads to Dos, RCE, etc.\n\n### Credits\nTeam : NodeBoB\n\n최지혁   ( Jihyeok Choi )\n\n이동하 ( Lee Dong Ha of ZeroPointer Lab )\n\n강성현    ( kang seonghyeun )\n\n박성진    ( sungjin park )\n\n김찬호    ( Chanho Kim )\n\n이수영    ( Lee Su Young )\n\n김민욱    ( MinUk Kim )\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@clickbar/dot-diver"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/clickbar/dot-diver/security/advisories/GHSA-9w5f-mw3p-pj47"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-45827"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/clickbar/dot-diver/commit/9790834cf4c2bca75db00e588e58056dacaf602f"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/clickbar/dot-diver/commit/98daf567390d816fd378ec998eefe2e97f293d5a"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/clickbar/dot-diver"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1321" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-11-03T19:03:40Z",
    "nvd_published_at" : "2023-11-06T18:15:08Z"
  }
}