# CVE-2021-23518: Prototype Pollution

- Severity: High 7.3 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.01%, higher than 81% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2022-01-21T20:05:29.374Z
- Modified: 2026-06-17T03:38:48.760Z
- Also known as: GHSA-wg6g-ppvx-927h
- Weaknesses: CWE-1321
- Assigned by: snyk

## Description

The package cached-path-relative before 1.1.0 are vulnerable to Prototype Pollution via the cache variable that is set as {} instead of Object.create(null) in the cachedPathRelative function, which allows access to the parent prototype properties when the object is used to create the cached relative path. When using the origin path as __proto__, the attribute of the object is accessed instead of a path. **Note:** This vulnerability derives from an incomplete fix in https://security.snyk.io/vuln/SNYK-JS-CACHEDPATHRELATIVE-72573

(As written by CVE List.)

## Affected

- cached-path-relative: from unspecified before 1.1.0
- cached-path-relative (npm): before 1.1.0
- cached-path-relative_project cached-path-relative: before 1.1.0
- debian debian_linux: 10.0

## Every score

- snyk: CVSS:3.1 7.3 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P`
- GitHub: CVSS:3.1 7.3 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`

## References

- <https://snyk.io/vuln/SNYK-JS-CACHEDPATHRELATIVE-2342653> (exploit, issue-tracking, patch, third-party-advisory, web)
- <https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2348246> (exploit, issue-tracking, patch, third-party-advisory, web)
- <https://github.com/ashaffer/cached-path-relative/commit/40c73bf70c58add5aec7d11e4f36b93d144bb760> (patch, third-party-advisory, web)
- <https://lists.debian.org/debian-lts-announce/2022/12/msg00006.html> (mailing-list, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-23518> (advisory)
- <https://github.com/ashaffer/cached-path-relative> (package)

## Sources

- CVE List: [CVE-2021-23518](https://www.cve.org/CVERecord?id=CVE-2021-23518), CVE Terms of Use, modified 2024-09-16
- GitHub Advisory Database: [GHSA-wg6g-ppvx-927h](https://github.com/advisories/GHSA-wg6g-ppvx-927h), CC-BY-4.0, modified 2025-01-14
- NVD: [CVE-2021-23518](https://nvd.nist.gov/vuln/detail/CVE-2021-23518), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-23518 · Whole record: https://cve.day/CVE-2021-23518.json · Rebuilt by cve.day 2026-11-25T22:58:06.617Z
