Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2024-21896

The permission model protects itself against path traversal attacks by calling path.resolve() on any paths given by the user. If the path is to be treated as a Buffer, the implementation uses Buffer.from() to obtain a Buffer from the result of path.resolve(). By monkey-patching Buffer internals, namely, Buffer.prototype.utf8Write, the application can modify the result of path.resolve(), which leads to a path traversal vulnerability. This vulnerability affects all users using the experimental permission model in Node.js 20 and Node.js 21. Please note that at the time this CVE was issued, the permission model is an experimental feature of Node.js.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-21896
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 07:14 UTC · Revision 1

Source evidence

CVE-2024-21896

core-osv · Original source

Published 20 Feb 2024, 01:31 UTC

The permission model protects itself against path traversal attacks by calling path.resolve() on any paths given by the user. If the path is to be treated as a Buffer, the implementation uses Buffer.from() to obtain a Buffer from the result of path.resolve(). By monkey-patching Buffer internals, namely, Buffer.prototype.utf8Write, the application can modify the result of path.resolve(), which leads to a path traversal vulnerability. This vulnerability affects all users using the experimental permission model in Node.js 20 and Node.js 21. Please note that at the time this CVE was issued, the permission model is an experimental feature of Node.js.

osv:CVE-2024-21896
Complete source record
{
  "id": "efb8cfafec065e0fd0aebc9dec388f0f176ce0fdc6189f368577ead0d2ac7d46",
  "url": "https://osv.dev/vulnerability/CVE-2024-21896",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2024-21896",
    "summary": "The permission model protects itself against path traversal attacks by calling path.resolve() on any paths given by the user. If the path is to be treated as a Buffer, the implementation uses Buffer.from() to obtain a Buffer from the result of path.resolve(). By monkey-patching Buffer internals, namely, Buffer.prototype.utf8Write, the application can modify the result of path.resolve(), which leads to a path traversal vulnerability. This vulnerability affects all users using the experimental permission model in Node.js 20 and Node.js 21. Please note that at the time this CVE was issued, the permission model is an experimental feature of Node.js.",
    "evidence": "osv:CVE-2024-21896",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2024-21896",
      "aliases": [
        "BIT-node-2024-21896",
        "BIT-node-min-2024-21896",
        "CVE-2024-21896"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N/CR:M/IR:M/AR:M"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/nodejs/node",
              "type": "GIT",
              "events": [
                {
                  "introduced": "e7618fb5a5fc25d76b6474e2a6607f04fd6f10e0"
                },
                {
                  "fixed": "9b1bf44ea9e7785e38c93b7d22d32dbca262df6c"
                },
                {
                  "introduced": "38d0e69347de4db532a3bb6bddf51ead9ff764f8"
                },
                {
                  "fixed": "3eccdd1ae61777a381a7ac3bc0ea62443dbb50b8"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:nodejs:node.js:*:*:*:*:-:*:*:*",
                    "range": [
                      {
                        "introduced": "20.0.0"
                      },
                      {
                        "fixed": "20.11.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:nodejs:node.js:*:*:*:*:-:*:*:*",
                    "range": [
                      {
                        "introduced": "21.0.0"
                      },
                      {
                        "fixed": "21.6.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v21.6.1",
            "v21.6.0",
            "v20.11.0",
            "v21.5.0",
            "v21.4.0",
            "v21.3.0",
            "v20.10.0",
            "v21.2.0",
            "v21.1.0",
            "v20.9.0",
            "v21.0.0",
            "v20.8.1",
            "v20.8.0",
            "v20.7.0",
            "v20.6.1",
            "v20.6.0",
            "v20.5.1",
            "v20.5.0",
            "v20.4.0",
            "v20.3.1",
            "v20.3.0",
            "v20.2.0",
            "v20.1.0",
            "v20.0.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-21896.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:50.177470273Z",
      "provider": "osv",
      "references": [
        "https://hackerone.com/reports/2218653",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21896.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-21896",
        "https://security.netapp.com/advisory/ntap-20240329-0002/"
      ],
      "provider_metadata": {
        "cna_assigner": "hackerone",
        "unresolved_ranges": [
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "4.0"
                  },
                  {
                    "fixed": "4.*"
                  },
                  {
                    "introduced": "5.0"
                  },
                  {
                    "fixed": "5.*"
                  },
                  {
                    "introduced": "6.0"
                  },
                  {
                    "fixed": "6.*"
                  },
                  {
                    "introduced": "7.0"
                  },
                  {
                    "fixed": "7.*"
                  },
                  {
                    "introduced": "8.0"
                  },
                  {
                    "fixed": "8.*"
                  },
                  {
                    "introduced": "9.0"
                  },
                  {
                    "fixed": "9.*"
                  },
                  {
                    "introduced": "10.0"
                  },
                  {
                    "fixed": "10.*"
                  },
                  {
                    "introduced": "11.0"
                  },
                  {
                    "fixed": "11.*"
                  },
                  {
                    "introduced": "12.0"
                  },
                  {
                    "fixed": "12.*"
                  },
                  {
                    "introduced": "13.0"
                  },
                  {
                    "fixed": "13.*"
                  },
                  {
                    "introduced": "14.0"
                  },
                  {
                    "fixed": "14.*"
                  },
                  {
                    "introduced": "15.0"
                  },
                  {
                    "fixed": "15.*"
                  },
                  {
                    "introduced": "16.0"
                  },
                  {
                    "fixed": "16.*"
                  },
                  {
                    "introduced": "17.0"
                  },
                  {
                    "fixed": "17.*"
                  },
                  {
                    "introduced": "19.0"
                  },
                  {
                    "fixed": "19.*"
                  },
                  {
                    "introduced": "20.0"
                  },
                  {
                    "fixed": "20.11.1"
                  },
                  {
                    "introduced": "21.0"
                  },
                  {
                    "fixed": "21.6.2"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              }
            ]
          }
        ],
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21896.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-21896",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 518621,
  "published_at": "2024-02-20T01:31:08.176+00:00"
}