Skip to content
XXE Advisory Intermediate CVE-2023-26043

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.

jorgectf Follow

Originally disclosed on GitHub Security Lab

GeoNode is vulnerable to an XML External Entity (XXE) injection in the style upload functionality of GeoServer leading to Arbitrary File Read.

jorgectf, on GitHub Security Lab

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

  1. Create a guest/non-privileged account and log in.
  2. Upload a dataset through /catalogue/#/upload/dataset whose name we will be referencing as <DATASET_NAME>.
  3. Send a request to upload a new style for the dataset, including an SLD file that defines an external entity pointing to /etc/passwd.
  4. 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.

More by jorgectf

View all

34 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

XML external entities (XXE)

The lesson behind this report.

An XML parser resolves entities the attacker defines, reading local files or making the server send requests.