CVE-2021-39371: XXE Injection in PyWPS

pywps Updated 02 Oct 2025

Summary

23/08/2021
Yes i
High
7.5

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

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.

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

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

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 →

Share this vulnerability

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.

Related vulnerabilities

Recent vulnerabilities recorded for pywps.

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 →

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