Directory Traversal Vulnerability in uwsgi

uwsgi Updated 02 Oct 2025

Summary

26/02/2018
N/A
Yes i
High
7.5

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 ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

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 →

Share this vulnerability

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.

Related vulnerabilities

Recent vulnerabilities recorded for uwsgi.

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback