Property
Languagepython
Severitymedium
CWECWE-22: Improper Limitation of a Pathname to a Restricted Directory (‘Path Traversal’)
OWASPA05:2017 - Broken Access Control
Confidence LevelMedium
Impact LevelMedium
Likelihood LevelMedium

Description#

The code uses user-supplied input from a web request directly as a file path in the open() function without proper validation or sanitization. This allows attackers to manipulate the file path and potentially access files outside the intended directory.

Impact#

If exploited, an attacker could read or modify sensitive files on the server, such as application code, configuration files, or system data. This can lead to data leaks, unauthorized access, or further compromise of the application and underlying system.