GHSA-8H9C-R582-MGGC
Vulnerability from github – Published: 2023-03-07 20:41 – Updated: 2024-10-07 21:17
VLAI
Summary
OWSLib vulnerable to XML External Entity (XXE) Injection
Details
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
resolve_entities=Falsetolxml's parser: https://github.com/geopython/OWSLib/pull/863
Workarounds
patch_well_known_namespaces(etree)
etree.set_default_parser(
parser=etree.XMLParser(resolve_entities=False)
)
References
Severity
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "OWSLib"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.28.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-27476"
],
"database_specific": {
"cwe_ids": [
"CWE-611"
],
"github_reviewed": true,
"github_reviewed_at": "2023-03-07T20:41:36Z",
"nvd_published_at": "2023-03-08T00:15:00Z",
"severity": "HIGH"
},
"details": "### Impact\n\nOWSLib\u0027s 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.\n\n### Patches\n\n- Use only lxml for XML handling, adding `resolve_entities=False` to `lxml`\u0027s parser: https://github.com/geopython/OWSLib/pull/863\n\n### Workarounds\n\n```python\npatch_well_known_namespaces(etree)\netree.set_default_parser(\n parser=etree.XMLParser(resolve_entities=False)\n)\n```\n\n### References\n\n- [`GHSL-2022-131`](https://securitylab.github.com/advisories/GHSL-2022-131_OWSLib/)\n",
"id": "GHSA-8h9c-r582-mggc",
"modified": "2024-10-07T21:17:55Z",
"published": "2023-03-07T20:41:36Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/geopython/OWSLib/security/advisories/GHSA-8h9c-r582-mggc"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-27476"
},
{
"type": "WEB",
"url": "https://github.com/geopython/OWSLib/pull/863"
},
{
"type": "WEB",
"url": "https://github.com/geopython/OWSLib/pull/863/commits/b92687702be9576c0681bb11cad21eb631b9122f"
},
{
"type": "PACKAGE",
"url": "https://github.com/geopython/OWSLib"
},
{
"type": "WEB",
"url": "https://github.com/geopython/OWSLib/releases/tag/0.28.1"
},
{
"type": "WEB",
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/owslib/PYSEC-2023-86.yaml"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2023/06/msg00032.html"
},
{
"type": "ADVISORY",
"url": "https://securitylab.github.com/advisories/GHSL-2022-131_owslib"
},
{
"type": "WEB",
"url": "https://www.debian.org/security/2023/dsa-5426"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:L",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:L/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "OWSLib vulnerable to XML External Entity (XXE) Injection"
}
Loading…
Loading…
Experimental. This forecast is provided for visualization only and may change without notice. Do not use it for operational decisions.
Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…