CVE-2021-23518
Prototype Pollution
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
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used
7.3
Prototype Pollution
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
- Record
CVE-2021-23518- 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 - Updated
- 2026-11-02
EUVDEUVD-2022-0723
7.3
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
- Record
EUVD-2022-0723- 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 - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-wg6g-ppvx-927h
7.3
Prototype Pollution in cached-path-relative
The package cached-path-relative before 1.1.0 is 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
- Record
GHSA-wg6g-ppvx-927h- 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 - Weakness
- CWE-1321
- Updated
- 2026-11-02
NVD
7.3
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
- Record
CVE-2021-23518- 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 - 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 - CVSS 2.0
- 7.5 High
AV:N/AC:L/Au:N/C:P/I:P/A:P - Weakness
- CWE-1321
- Updated
- 2026-11-02
OSV
9.8
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
- Record
CVE-2021-23518- 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 - Updated
- 2026-11-02
OSVDEBIAN-CVE-2021-23518
9.8
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
- Record
DEBIAN-CVE-2021-23518- 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 - Updated
- 2026-11-02
OSVGHSA-wg6g-ppvx-927h
7.3
Prototype Pollution in cached-path-relative
The package cached-path-relative before 1.1.0 is 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
- Record
GHSA-wg6g-ppvx-927h- 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 - Weakness
- CWE-1321
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2021-23518
7.3
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
- Record
UBUNTU-CVE-2021-23518- 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 - 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 - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
cached-path-relativenpm |
before 1.1.0 | 1.1.0 |
node-cached-path-relativeDebian:12 |
before 1.1.0+~1.0.0-1 | 1.1.0+~1.0.0-1 |
node-cached-path-relativeDebian:13 |
before 1.1.0+~1.0.0-1 | 1.1.0+~1.0.0-1 |
node-cached-path-relativeDebian:14 |
before 1.1.0+~1.0.0-1 | 1.1.0+~1.0.0-1 |
node-cached-path-relativeDebian:10 From an advisory covering 2 CVEs |
before 1.0.1-2+deb10u1, plus listed versions 1.0.1-2 |
1.0.1-2+deb10u1 |
node-cached-path-relativeUbuntu:18.04:LTS |
All versions, plus listed versions 1.0.1-1 |
None known |
node-cached-path-relativeUbuntu:20.04:LTS |
All versions, plus listed versions 1.0.2-1 |
None known |
node-cached-path-relativeUbuntu:22.04:LTS |
All versions, plus listed versions 1.0.2-11.0.2-21.0.2-31.1.0+~1.0.0-1 |
None known |
node-cached-path-relativeUbuntu:24.04:LTS |
All versions, plus listed versions 1.1.0+~1.0.0-3 |
None known |
node-cached-path-relativeUbuntu:25.10 |
All versions, plus listed versions 1.1.0+~1.0.0-3 |
None known |
node-cached-path-relativeUbuntu:26.10 |
All versions, plus listed versions 1.1.0+~1.0.2-1 |
None known |
node-cached-path-relativeUbuntu:26.04:LTS |
All versions, plus listed versions 1.1.0+~1.0.0-31.1.0+~1.0.2-1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| aliases, products, published | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-23518 is a high vulnerability (CVSS 7.3) in Cached-path-relative Project Cached-path-relative, published January 21, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.94%, the 80th percentile. Fixed in cached-path-relative 1.1.0.
References
snyk.io/vuln/SNYK-JS-CACHEDPATHRELATIVE-2342653
snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2348246
github.com/ashaffer/cached-path-relative/commit/40c73bf70c58add5aec7d11e4f36b93d144bb760
lists.debian.org/debian-lts-announce/2022/12/msg00006.html
nvd.nist.gov/vuln/detail/CVE-2021-23518
github.com/advisories/GHSA-wg6g-ppvx-927h