GHSL-2022-131: XML External Entities (XXE) injection in OWSLib - CVE-2023-27476
OWSLib did not disable entity resolution for its XML parsing calls, so if any part of a parsed XML document was user-controlled, an attacker could inject XML external entities and read arbitrary files from the file system.
OWSLib does not disable entity resolution for XML parsing, leading to XML External Entities (XXE) injection.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the XML parser was used with default settings that allow external entity resolution, and this was not disabled across the library's parsing calls.
Impact
This issue may lead to arbitrary file read, and several dependent projects that parse custom XML without mitigation are also vulnerable.
What the attacker needed
User-controlled XML is parsed by OWSLib
The fix
The issue was fixed by disabling entity resolution, as indicated by the published advisory.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
XML files can contain special instructions called entities that pull in content from elsewhere. If a program parses XML without turning this feature off, an attacker can make the parser fetch a local file and include its contents in the output. Here, OWSLib left this feature enabled, so user-supplied XML could be used to read files on the server.
What is XXE?
An XML parser resolves entities the attacker defines, reading local files or making the server send requests.