PT-2024-36735 · Npm · Path-Sanitizer
Realarcherl
·
Published
2024-12-31
·
Updated
2025-01-05
·
CVE-2024-56198
CVSS v4.0
9.3
Critical
| Vector | AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
Name of the Vulnerable Software and Affected Versions
path-sanitizer versions prior to 3.1.0
Description
The path-sanitizer npm package has a path traversal vulnerability due to a filter bypass issue. This can be exploited using .=%5c, allowing an attacker to traverse the file system. Any CLI tool or library using this package can be vulnerable to path traversal. The issue is fixed in version 3.1.0.
Recommendations
For path-sanitizer versions prior to 3.1.0, update to version 3.1.0 or later to resolve the issue. As a temporary workaround, consider restricting the use of the
sanitize() function until a patch is available. Avoid using the .= %5c sequence in paths to minimize the risk of exploitation.Exploit
Fix
Path traversal
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Path-Sanitizer