CVE-2023-27476: GHSL-2022-131: XML External Entities (XXE) injection in OWSLib - CVE-2023-27476

Published Mar 7, 2023
·
Updated

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

- Use only lxml for XML handling, adding resolveentities=False to lxml's parser: https://github.com/geopython/OWSLib/pull/863

Workarounds

python patchwellknownnamespaces(etree) etree.setdefaultparser( parser=etree.XMLParser(resolveentities=False) )

References

- GHSL-2022-131

Other sources

OWSLib does not disable entity resolution for XML parsing, leading to XML External Entities (XXE) injection.

GitHub Security Lab

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 Software

3 affected componentsFixes available
debian/owslib<=0.17.1-1
0.17.1-1+deb10u10.23.0-1+deb11u10.27.2-30.29.2-1
pip/OWSLib<0.28.1
0.28.1
OSGeo Owslib<0.28.1

Event History

Mar 7, 2023
Advisory Published
via GitHub·08:41 PM
CVE Published
via MITRE·11:20 PM
Data Sourced
via MITRE·11:20 PM
DescriptionSeverityWeakness
Mar 15, 2023
Advisory Published
via GitHub Security Lab·12:00 AM
Data Sourced
via GitHub Security Lab·12:00 AM
Description
Apr 10, 2023
Data Sourced
05:42 PM
SeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2023-27476?

CVE-2023-27476 is a vulnerability in the OWSLib Python package that allows arbitrary file reads from the file system.

2

How does CVE-2023-27476 occur?

CVE-2023-27476 occurs because OWSLib's XML parser does not disable entity resolution.

3

What is the severity of CVE-2023-27476?

CVE-2023-27476 has a severity rating of 7.5 (high).

4

Which versions of OWSLib are affected by CVE-2023-27476?

OWSLib versions up to and including 0.28.1 are affected by CVE-2023-27476.

5

How can I fix CVE-2023-27476?

To fix CVE-2023-27476, update OWSLib to version 0.29.2-1 or higher.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203