CVE-2023-27476
JSON

8.2high

XML External Entity (XXE) Injection in OWSLib

Severity
8.2high CVSS:3.1 by GitHub_M
Exploit likelihood
0.98% (higher than 63% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-8h9c-r582-mggcPYSEC-2023-86

Description

OWSLib is a Python package for client programming with Open Geospatial Consortium (OGC) web service interface standards, and their related content models. OWSLib's XML parser (which supports both `lxml` and `xml.etree`) does not disable entity resolution, and could lead to arbitrary file reads from an attacker-controlled XML payload. This affects all XML parsing in the codebase. This issue has been addressed in version 0.28.1. All users are advised to upgrade. The only known workaround is to patch the library manually. See `GHSA-8h9c-r582-mggc` for details.

Affected

Product or packageVersionsReported by
geopython OWSLib< 0.28.1CVE List
owslib (PyPI)before 0.28.1, before b92687702be9576c0681bb11cad21eb631b9122fGitHub Advisory Database, PyPA Advisory Database
osgeo owslibbefore 0.28.1NVD

All scores

GitHub_M8.2high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:L
GitHub8.2high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:L
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:L/SC:N/SI:N/SA:N
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Classification

CWE-611

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

OWSLib is a Python package for client programming with Open Geospatial Consortium (OGC) web service interface standards, and their related content models. OWSLib's XML parser (which supports both `lxml` and `xml.etree`) does not disable entity resolution, and could lead to arbitrary file reads from an attacker-controlled XML payload. This affects all XML parsing in the codebase. This issue has been addressed in version 0.28.1. All users are advised to upgrade. The only known workaround is to patch the library manually. See `GHSA-8h9c-r582-mggc` for details.

GitHub Advisory Database
Impact

OWSLib's XML parser (which supports both lxml and xml.etree) does not disable entity resolution for lxml, and could lead to arbitrary file reads from an attacker-controlled XML payload. This affects all XML parsing in the codebase.

Patches
Workarounds
patch_well_known_namespaces(etree)
etree.set_default_parser(
    parser=etree.XMLParser(resolve_entities=False)
)
References

References

Sources

SourceRecordLicence
CVE ListCVE-2023-27476 changed 2025-02-25CVE Terms of Use
GitHub Advisory DatabaseGHSA-8h9c-r582-mggc changed 2026-02-22CC-BY-4.0
NVDCVE-2023-27476 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2023-86 changed 2026-02-22CC-BY-4.0