CVE-2021-23518
CRITICAL 9.8CVSS 3.1Prototype Pollution in cached-path-relative
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
- Published
- 21 Jan 2022
- Last modified
- 17 Jun 2026
- Assigned by
- report@snyk.io
- NVD status
- Modified
- Weakness
- CWE-1321
- Also known as
- GHSA-wg6g-ppvx-927h
- Sources
- NVDJSONOSV GHSA-wg6g-ppvx-927hJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | report@snyk.io (Secondary) | CVSS 3.1 | HIGH 7.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
| OSV | GitHub | CVSS 3.1 | HIGH 7.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | HIGH 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | cached-path-relative_project | cached-path-relativecpe:2.3:a:cached-path-relative_project:cached-path-relative:*:*:*:*:*:node.js:*:* |
< 1.1.0 | 1.1.0 |
| NVD | debian | debian_linuxcpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* |
= 10.0 | |
| OSV | npm | cached-path-relative | < 1.1.0 | 1.1.0 |
References
- 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://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2348246 · Exploit, Issue Tracking, Patch, Third Party Advisory, WEB
- https://snyk.io/vuln/SNYK-JS-CACHEDPATHRELATIVE-2342653 · Exploit, Issue Tracking, Patch, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-23518 · ADVISORY
- https://github.com/ashaffer/cached-path-relative · PACKAGE
History
- 25 Nov 2026 20:34 UTC · NVD: first stored (published 21 Jan 2022)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 27 Jan 2022)