Description
All versions of the package @nubosoftware/node-static; all versions of the package node-static are vulnerable to Directory Traversal due to improper file path sanitization in the startsWith() method in the servePath function.
Remediation
References
https://github.com/cloudhead/node-static/blob/master/lib/node-static.js%23L160-L163
https://gist.github.com/lirantal/c80b28e7bee148dc287339cb483e42bc
https://security.snyk.io/vuln/SNYK-JS-NUBOSOFTWARENODESTATIC-3149927
https://security.snyk.io/vuln/SNYK-JS-NODESTATIC-3149928
Related Vulnerabilities
CVE-2023-46122 Vulnerability in maven package org.scala-sbt:io_2.13
CVE-2022-25872 Vulnerability in npm package fast-string-search
CVE-2022-0239 Vulnerability in maven package edu.stanford.nlp:stanford-corenlp
CVE-2020-7738 Vulnerability in npm package shiba
CVE-2020-12265 Vulnerability in maven package org.webjars.npm:decompress-tar