Skip to content
Heist/ feed
Back to feed
Critical

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-23518

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

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-23518
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 11:40 UTC · Revision 1

Source evidence

CVE-2021-23518

core-osv · Original source

Published 21 Jan 2022, 20:15 UTC

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

osv:CVE-2021-23518
Complete source record
{
  "id": "2a09d6927c7836f518e52120e179fcf9b81528c7a65a5ae14db788ef800f119e",
  "url": "https://osv.dev/vulnerability/CVE-2021-23518",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-23518",
    "summary": "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",
    "evidence": "osv:CVE-2021-23518",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2021-23518",
      "aliases": [
        "CVE-2021-23518",
        "GHSA-wg6g-ppvx-927h"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/ashaffer/cached-path-relative",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "40c73bf70c58add5aec7d11e4f36b93d144bb760"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "fixed": "40c73bf70c58add5aec7d11e4f36b93d144bb760"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-23518.json"
          }
        }
      ],
      "modified": "2026-10-20T10:54:32.546347927Z",
      "provider": "osv",
      "references": [
        "https://lists.debian.org/debian-lts-announce/2022/12/msg00006.html",
        "https://github.com/ashaffer/cached-path-relative/commit/40c73bf70c58add5aec7d11e4f36b93d144bb760",
        "https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2348246",
        "https://snyk.io/vuln/SNYK-JS-CACHEDPATHRELATIVE-2342653"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:a:cached-path-relative_project:cached-path-relative:*:*:*:*:*:node.js:*:*"
            ],
            "vendor_product": "cached-path-relative_project:cached-path-relative",
            "extracted_events": [
              {
                "range": [
                  {
                    "fixed": "1.1.0"
                  }
                ],
                "source": "CPE_RANGE"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*"
            ],
            "vendor_product": "debian:debian_linux",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "10.0"
                  },
                  {
                    "last_affected": "10.0"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "fixed": "1.1.0"
                  }
                ],
                "source": "DESCRIPTION"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2021-23518",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 385526,
  "published_at": "2022-01-21T20:15:07.963+00:00"
}