Directory Traversal Vulnerability in uwsgi
Summary
CVE-2018-7490: uWSGI before 2.0.17 mishandles a DOCUMENT_ROOT check during use of the --php-docroot option, allowing directory traversal. Affects uwsgi across 2 version ranges.
< 2.0.17-r0
< 50ffc6b28a7a84e273fb2b79c8d657b45887fe87
Fixed in 2.0.17-r0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
uwsgi is a high-performance web server and application server for Python web applications. It is commonly used to deploy web applications written in Python. This vulnerability affects versions of uwsgi before 2.0.17. The vulnerability arises from a mishandling of the DOCUMENT_ROOT check when using the --php-docroot option, allowing for directory traversal attacks.
Vulnerability Detail
The directory traversal vulnerability in uwsgi allows an attacker to access files outside of the intended directory. By exploiting this vulnerability, an attacker can potentially view sensitive files, modify files, or execute arbitrary code on the server. This can lead to unauthorized access, data leakage, and compromise of the server's integrity.
How To Fix
Minimum fixed version
2.0.17-r0
This is the first release that contains the fix.
sudo apk add --upgrade uwsgi
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If updating uwsgi is not immediately possible, a temporary workaround is to disable the --php-docroot option or ensure that it is properly configured to prevent directory traversal. This can be done by modifying the uwsgi configuration file or command-line options.
Conclusion
The directory traversal vulnerability in uwsgi can be mitigated by updating to version 2.0.17 or later. If immediate update is not possible, disabling or properly configuring the --php-docroot option can serve as a temporary workaround. For further assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for uwsgi →
FAQ
uwsgi is a web server and application server for Python web applications. It provides high performance and is commonly used to deploy Python web applications.
The vulnerability allows an attacker to access files outside of the intended directory, potentially leading to unauthorized access, data leakage, and compromise of the server's integrity.
To fix this vulnerability, update uwsgi to version 2.0.17 or later. Follow the instructions provided by the uwsgi project or use package management tools specific to your operating system.
A temporary workaround is to disable the --php-docroot option or properly configure it to prevent directory traversal. Modify the uwsgi configuration file or command-line options accordingly.
For more information about this vulnerability, refer to the provided CVE identifier (CVE-2018-7490) or the related sources mentioned in the vulnerability details.
References
Related vulnerabilities
Recent vulnerabilities recorded for uwsgi.