CVE-2025-69983: Nodejs Naive Path Traversal Sanitization

Path sanitization relies on a naive string/regex replace of "../" instead of resolving the final path and verifying it stays within the intended base directory. Blacklisting "../" does not handle absolute paths, encoded traversal sequences, mixed separators, or sequences that reappear after path.normalize, and is bypassable. Use path.resolve and verify the r

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0JS
greprules fetch cve-2025-69983-nodejs-naive-path-traversal-sanitization --engine opengrep

Description

Path sanitization relies on a naive string/regex replace of "../" instead of resolving the final path and verifying it stays within the intended base directory. Blacklisting "../" does not handle absolute paths, encoded traversal sequences, mixed separators, or sequences that reappear after path.normalize, and is bypassable. Use path.resolve and verify the r