CVE-2024-56198
Description
path-sanitizer is a simple lightweight npm package for sanitizing paths to prevent Path Traversal. Prior to 3.1.0, the filters can be bypassed using .=%5c which results in a path traversal. This vulnerability is fixed in 3.1.0.
Severity
CRITICAL
CVSS v3
not scored
CVSS v4
9.3
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 · source cna
Exploit chance (EPSS)
0.743%
chance of exploitation in the next 30 days
higher than 55.3% of scored CVEs · 2026-11-17
CISA KEV
Not listed
Public exploit code
None public
Exploit references (NVD and CNA): 0
Metasploit modules: 0
Nuclei templates: 0
Weakness
- CWE-22: Improper Limitation of a Pathname to a Restricted Directory
CISA SSVC decision points
| Exploitation | poc |
|---|---|
| Automatable | yes |
| Technical impact | total |
| Scored | 2024-12-31 |
Timeline
- 2024-12-31Published by the CNA15:18 UTC
- 2024-12-31CISA SSVC decision recordedsame day
- 2025-01-02GitHub advisory published (GHSA-94p5-r7cc-3rpr)2 days after publication
Exploit and advisory records
GitHub advisory GHSA-94p5-r7cc-3rpr, affected packages:
| Package | Vulnerable versions | Fixed in |
|---|---|---|
| npm path-sanitizer | before 3.1.0 | 3.1.0 |
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| cabraviva path-sanitizer |
References
- https://github.com/cabraviva/path-sanitizer/commit/b6d2319eac910dffdfacc8460f5b5cc5a1518ead
- https://github.com/cabraviva/path-sanitizer/security/advisories/GHSA-94p5-r7cc-3rpr
- https://www.loom.com/share/b766ece5193842848ce7562fcd559256?sid=fd826eb6-0eee-4601-bf0e-9cfee5c56e9d
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2024-56198'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2024-56198'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2024-56198'curl 'https://api.contrastcyber.com/cve_products/CVE-2024-56198'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).