Wiz Agents & Workflows are here

CVE-2024-56198
JavaScript vulnerability analysis and mitigation

Overview

path-sanitizer is a simple lightweight npm package designed for sanitizing paths to prevent Path Traversal attacks. A critical vulnerability was discovered in versions prior to 3.1.0, where the path sanitization filters could be bypassed using the sequence '.=%5c', resulting in a path traversal vulnerability. This security flaw was assigned CVE-2024-56198 and was fixed in version 3.1.0 (GitHub Advisory).

Technical details

The vulnerability exists in the path sanitization logic where the filters can be bypassed using special character sequences. Specifically, using '.=%5c' in the path allows an attacker to perform directory traversal, effectively bypassing the intended security controls. The vulnerability has been assigned a CVSS v4.0 base score of 9.3 CRITICAL with the vector string: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N. The issue is classified as CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (NVD).

Impact

The vulnerability allows attackers to traverse directory structures outside of the intended directory scope. Any CLI tool or library using this package could be vulnerable to path traversal attacks, potentially enabling unauthorized access to files and directories outside the intended directory structure (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been fixed in version 3.1.0 of the path-sanitizer package. Users are strongly advised to upgrade to this version or later to address the security issue. The fix includes improved path sanitization logic to prevent the bypass technique (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-34156CRITICAL9.9
  • JavaScriptJavaScript
  • @nocobase/plugin-workflow-javascript
NoYesMar 30, 2026
CVE-2026-34363HIGH8.2
  • JavaScriptJavaScript
  • parse-server
NoYesMar 30, 2026
CVE-2026-33949HIGH8.1
  • JavaScriptJavaScript
  • @tinacms/graphql
NoYesMar 30, 2026
CVE-2026-34043MEDIUM5.9
  • JavaScriptJavaScript
  • serialize-javascript
NoYesMar 31, 2026
CVE-2026-34373MEDIUM5.3
  • JavaScriptJavaScript
  • parse-server
NoYesMar 30, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management