# CVE-2023-45827: Prototype Pollution vulnerability in @clickbar/dot-diver


- **Severity:** High 7.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 6 Nov 2023
- **Updated:** 4 Sep 2024
- **Also known as:** GHSA-9w5f-mw3p-pj47

## What is CVE-2023-45827?

CVE-2023-45827 is a high-severity vulnerability in clickbar dot-diver, published on 6 Nov 2023. 

### Official description

Dot diver is a lightweight, powerful, and dependency-free TypeScript utility library that provides types and functions to work with object paths in dot notation. In versions prior to 1.0.2 there is a Prototype Pollution vulnerability in the `setByPath` function which can leads to remote code execution (RCE). This issue has been addressed in commit `98daf567` which has been included in release 1.0.2. Users are advised to upgrade. There are no known workarounds to this vulnerability.

Weakness: CWE-1321 (Improperly Controlled Modification of Object Prototype Attributes)

## Which versions are affected by CVE-2023-45827?

2 open source packages ship an affected version, including @clickbar/dot-diver. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@clickbar/dot-diver` | npm | All versions | 1.0.2 |
| `@clickbar/dot-diver` | npm | All versions | 1.0.2 |

Products: Clickbar Dot-Diver.

## How do I fix CVE-2023-45827?

Upgrade @clickbar/dot-diver to 1.0.2 or later.

## Is CVE-2023-45827 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-45827 exists.

Public exploit code:

- pp (github_poc): https://github.com/200101WhoAmI/CVE-2023-45827

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-45827 and fix it if it is affected.

What it is: CVE-2023-45827 is a high-severity vulnerability in clickbar dot-diver, published on 6 Nov 2023. 
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-45827 exists.

Affected packages and fixed versions:
- @clickbar/dot-diver (npm): affected all versions; fixed in 1.0.2
- @clickbar/dot-diver (npm): affected all versions; fixed in 1.0.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-45827/ (Markdown: https://insights.sbomify.com/CVE-2023-45827/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-45827
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-45827
- OSV: https://osv.dev/vulnerability/CVE-2023-45827

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-45827/
Summaries are generated and may contain mistakes; the official description above is the record.
