owslib
Affected
- introduced
0, fixed0.28.1(ecosystem)
Fixed versions
0.28.1
Fix
- Fixed version
0.28.1pip install --upgrade owslib==0.28.1
Advisory
Also known as: CVE-2023-27476, PYSEC-2023-86
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 for lxml, and could lead to arbitrary file reads from an attacker-controlled XML payload. This affects all XML parsing in the codebase.
Patches
resolve_entities=False to lxml's parser: https://github.com/geopython/OWSLib/pull/863Workarounds
patch_well_known_namespaces(etree)
etree.set_default_parser(
parser=etree.XMLParser(resolve_entities=False)
)
References
High Basis: The source's own band: HIGH
0, fixed 0.28.1 (ecosystem)0.28.1
0.28.1pip install --upgrade owslib==0.28.1Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0