CVE-2021-39371: XML External Entity Injection in PyWPS
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.62563%
CWE
Published
9/2/2021
Updated
10/24/2024
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
pywps | pip | < 4.5.0 | 4.5.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from using lxml's default XML parser without disabling external entity resolution. The key vulnerable functions were direct usages of lxml.etree.fromstring() and parse() methods across multiple files before they were replaced with a secured parser (via pywps/xml_util.py) that sets resolve_entities=False. The patch specifically modified these calls to use the secured parser, confirming their role in the XXE vulnerability. The medium confidence on tostring() reflects its involvement in XML processing even though it's not directly responsible for entity resolution.