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://gist.github.com/lirantal/c80b28e7bee148dc287339cb483e42bc
https://github.com/cloudhead/node-static/blob/master/lib/node-static.js%23L160-L163
https://security.snyk.io/vuln/SNYK-JS-NODESTATIC-3149928
https://security.snyk.io/vuln/SNYK-JS-NUBOSOFTWARENODESTATIC-3149927
Related Vulnerabilities
CVE-2022-39251 Vulnerability in npm package matrix-js-sdk
CVE-2021-37136 Vulnerability in maven package io.netty:netty-codec
CVE-2023-30537 Vulnerability in maven package org.xwiki.platform:xwiki-platform-flamingo-theme-ui
CVE-2020-10591 Vulnerability in maven package com.walmartlabs.concord.server:concord-server-impl
CVE-2020-11991 Vulnerability in maven package org.apache.cocoon:cocoon-core