GHSL-2022-129: XML External Entity (XXE) injection in GeoNode - CVE-2023-26043
GeoNode's style upload feature parses user-supplied SLD files with an XML parser that resolves external entities, allowing an attacker to read arbitrary files. A low-privileged user can upload a crafted SLD file and receive the contents of a local file in the response.
GeoNode is vulnerable to an XML External Entity (XXE) injection in the style upload functionality of GeoServer leading to Arbitrary File Read.
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
Impact
This issue may lead to Arbitrary File Read.
What the attacker needed
A guest/non-privileged account; ability to upload a dataset; ability to upload a style
The fix
The issue was fixed by a pull request that addressed the vulnerability.
How it was found
- Create a guest/non-privileged account and log in.
- Upload a dataset through /catalogue/#/upload/dataset whose name we will be referencing as <DATASET_NAME>.
- Send a request to upload a new style for the dataset, including an SLD file that defines an external entity pointing to /etc/passwd.
- The response returns the resolved entity with the contents of /etc/passwd.
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.
When a program reads XML data, it can be tricked into including the contents of local files if it processes special instructions called 'entities'. Here, the style upload feature did not disable this, so an attacker could make the server include a file like /etc/passwd in its response. This lets an attacker see files they should not have access to.
What is XXE?
An XML parser resolves entities the attacker defines, reading local files or making the server send requests.