CVE-2023-27476 XML External Entity (XXE) Injection in OWSLib

High 8.2 Published Updated

An attacker can read arbitrary files via XML External Entity injection in OWSLib's XML parser, affecting users of this Python library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2023-27476?

CVE-2023-27476 is a high-severity vulnerability in geopython OWSLib, published on 7 Mar 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-611

Which versions are affected by CVE-2023-27476?

3 open source packages ship an affected version, including owslib and OWSLib. It affects 1 product.

PackageAffectedFixed in
owslib PyPIAll versions0.28.1
owslib PyPIAll versions0.28.1
OWSLib PyPIAll versions0.28.1

Products include Osgeo Owslib.

How do I fix CVE-2023-27476?

Upgrade owslib to 0.28.1 or later.

Is CVE-2023-27476 being exploited?

There is no known exploitation of CVE-2023-27476 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2023-27476, DLA-3470-1, DSA-5426-1, GHSA-8h9c-r582-mggc, MGASA-2023-0112, PYSEC-2023-86 and 1 more.

Is CVE-2023-27476 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free