CVE-2021-39371: XXE Injection in PyWPS
Summary
CVE-2021-39371: An XML external entity (XXE) injection in PyWPS before 4.5.0 allows an attacker to view files on the application server filesystem by assigning a path to the entity. Affects pywps versions < 4.5.0. Fixed in 4.5.0. How to fix ↓
Also tracked for
- pywps · Debian:11
The same CVE-2021-39371 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
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
PyWPS is a Python library that provides an implementation of the Web Processing Service (WPS) standard. It allows users to publish, discover, and execute geospatial processes over the web. PyWPS is commonly used in geospatial applications and provides a range of functionalities for processing geospatial data. However, a vulnerability has been discovered in PyWPS versions prior to 4.5.0 that allows an attacker to perform XML external entity (XXE) injection. This vulnerability may also affect OWSLib 0.24.1.
Vulnerability Detail
The XXE injection vulnerability in PyWPS allows an attacker to view files on the application server filesystem by assigning a path to the entity. By exploiting this vulnerability, an attacker can potentially access sensitive files and gather confidential information. This can lead to unauthorized disclosure of data and compromise the security of the affected system. It is important to note that this vulnerability may also impact OWSLib 0.24.1, which could widen the scope of potential attacks.
How To Fix
Latest published version: 4.8.1 as of 22 Oct 2026
pip install --upgrade "pywps==4.8.1"
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
4.5.0
This is the first release that contains the fix.
pip install --upgrade "pywps==4.5.0"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. It is essential to apply the recommended fix by upgrading PyWPS and OWSLib to the appropriate versions.
Conclusion
The XXE injection vulnerability in PyWPS and potentially OWSLib can lead to unauthorized access to sensitive files on the application server. It is crucial to upgrade to PyWPS version 4.5.0 or later, and update OWSLib if applicable, to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for pywps →
FAQ
PyWPS is a Python library that implements the Web Processing Service (WPS) standard. It allows users to publish, discover, and execute geospatial processes over the web.
XML external entity (XXE) injection is a vulnerability that allows an attacker to include external entities in an XML document, leading to potential information disclosure and other security risks.
By injecting malicious XML content, an attacker can specify a path to a file on the application server filesystem, allowing them to view the contents of that file.
PyWPS versions prior to 4.5.0 are affected by this vulnerability.
OWSLib version 0.24.1 may also be affected by this XXE injection vulnerability.
References
Related vulnerabilities
Recent vulnerabilities recorded for pywps.