Description
When a web server fails to properly normalize and validate the ../
sequence in URL paths, it enables attackers to access files outside the intended directory structure. This vulnerability can lead to reading sensitive system files such as /etc/passwd
or application configuration files. The issue may arise due to bugs in the web server or the router application responsible for serving static files.
Recommendation
To mitigate this risk:
- Ensure the web server and any components used for serving static files are kept up to date to patch known vulnerabilities.
- Implement proper validation and sanitization mechanisms in your web application to prevent serving files outside of the intended path.
- Conduct thorough debugging and tracing of your web application’s route dispatching to identify and rectify potential vulnerabilities.