Security
Headlines
HeadlinesLatestCVEs

Headline

GHSA-8h9c-r582-mggc: OWSLib vulnerable to XML External Entity (XXE) Injection

Impact

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.

Patches

This issue is patched in 0.28.1.

Workarounds

The patch approach should be:

  • update all XML support as follows:
    • use ONLY lxml.etree
    • apply the patch below
patch_well_known_namespaces(etree)
etree.set_default_parser(
    parser=etree.XMLParser(resolve_entities=False)
)

References

  • GHSL-2022-131
ghsa
#git

Affected versions

< 0.28.1

Description

Impact

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.

Patches

This issue is patched in 0.28.1.

Workarounds

The patch approach should be:

  • update all XML support as follows:
    • use ONLY lxml.etree
    • apply the patch below

patch_well_known_namespaces(etree) etree.set_default_parser( parser=etree.XMLParser(resolve_entities=False) )

References

  • GHSL-2022-131

References

  • GHSA-8h9c-r582-mggc
  • geopython/OWSLib#863
  • https://github.com/geopython/OWSLib/releases/tag/0.28.1

Published to the GitHub Advisory Database

Mar 7, 2023

Related news

Debian Security Advisory 5426-1

Debian Linux Security Advisory 5426-1 - An arbitrary file reads from malformed XML payload vulnerability was discovered in owslib, the Python client library for Open Geospatial (OGC) web services. This issue has been addressed by always using lxml as the XML parser with entity resolution disabled.

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

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.

ghsa: Latest News

GHSA-hqmp-g7ph-x543: TunnelVision - decloaking VPNs using DHCP