# GHSA-826p-4gcg-35vw: GeoTools has XML External Entity (XXE) Processing Vulnerability in XSD schema handling

> Attackers can exploit XXE in GeoTools XSD handling to read local files or perform SSRF via crafted XML schemas.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 9 Jun 2025

## What is GHSA-826p-4gcg-35vw?

GHSA-826p-4gcg-35vw is a vulnerability in org.geotools:gt-wfs-ng, published on 9 Jun 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

### Summary

GeoTools Schema class use of Eclipse XSD library to represent schema data structure is vulnerable to XML External Entity (XXE) exploit.

### Impact

This impacts whoever exposes XML processing with ``gt-xsd-core`` involved in parsing, when the documents carry a reference to an external XML schema. The ``gt-xsd-core`` Schemas class is not using the EntityResolver provided by the ParserHandler (if any was configured).

This also impacts users of ``gt-wfs-ng`` DataStore where the ENTITY_RESOLVER connection parameter was not being used as intended.

### Resolution

GeoTools API change allows EntityResolver to be supplied to the following methods:

```java
Schemas.parse( location, locators, resolvers, uriHandlers, entityResolver);
Schemas.findSchemas(Configuration configuration, EntityResolver entityResolver);
```

With this API change the `gt-wfs-ng` WFS DataStore ENTITY_RESOLVER parameter is now used.

### Reference

* [GHSA-jj54-8f66-c5pc](https://github.com/geoserver/geoserver/security/advisories/GHSA-jj54-8f66-c5pc): Describes the impact of the ``gt-xsd-core`` vulnerability on the GeoServer WFS protocol, resulting in both Service Side Request Forgery (SSRF) and Out-of-Band (OOB) data exfiltration of local files.

* [GHSA-2p76-gc46-5fvc](https://github.com/geonetwork/core-geonetwork/security/advisories/GHSA-2p76-gc46-5fvc): Describes the impact of the ``gt-wfs-ng`` and ``gt-xsd-core`` vulnerability on the GeoNetwork WFS Index functionality.

## Which versions are affected by GHSA-826p-4gcg-35vw?

16 open source packages ship an affected version, including org.geotools:gt-wfs-ng and org.geotools:gt-xsd-core.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.geotools:gt-wfs-ng` | Maven | All versions | 28.6.1 |
| `org.geotools:gt-wfs-ng` | Maven | All versions | 28.6.1 |
| `org.geotools:gt-wfs-ng` | Maven | From 29.0 | 31.7 |
| `org.geotools:gt-wfs-ng` | Maven | From 29.0 | 31.7 |
| `org.geotools:gt-wfs-ng` | Maven | From 32.0 | 32.3 |
| `org.geotools:gt-wfs-ng` | Maven | From 32.0 | 32.3 |
| `org.geotools:gt-wfs-ng` | Maven | From 33.0 | 33.1 |
| `org.geotools:gt-wfs-ng` | Maven | From 33.0 | 33.1 |
| `org.geotools:gt-xsd-core` | Maven | All versions | 28.6.1 |
| `org.geotools:gt-xsd-core` | Maven | All versions | 28.6.1 |
| `org.geotools:gt-xsd-core` | Maven | From 29.0 | 31.7 |
| `org.geotools:gt-xsd-core` | Maven | From 29.0 | 31.7 |
| `org.geotools:gt-xsd-core` | Maven | From 32.0 | 32.3 |
| `org.geotools:gt-xsd-core` | Maven | From 32.0 | 32.3 |
| `org.geotools:gt-xsd-core` | Maven | From 33.0 | 33.1 |
| `org.geotools:gt-xsd-core` | Maven | From 33.0 | 33.1 |

## How do I fix GHSA-826p-4gcg-35vw?

Upgrade org.geotools:gt-wfs-ng to a fixed version for your release line: 28.6.1, 31.7, 32.3 or 33.1.

## Is GHSA-826p-4gcg-35vw being exploited?

There is no known exploitation of GHSA-826p-4gcg-35vw in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-826p-4gcg-35vw and fix it if it is affected.

What it is: GHSA-826p-4gcg-35vw is a vulnerability in org.geotools:gt-wfs-ng, published on 9 Jun 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-826p-4gcg-35vw in the wild and no public exploit code.

Affected packages and fixed versions:
- org.geotools:gt-wfs-ng (Maven): affected all versions; fixed in 28.6.1
- org.geotools:gt-wfs-ng (Maven): affected all versions; fixed in 28.6.1
- org.geotools:gt-wfs-ng (Maven): affected from 29.0; fixed in 31.7
- org.geotools:gt-wfs-ng (Maven): affected from 29.0; fixed in 31.7
- org.geotools:gt-wfs-ng (Maven): affected from 32.0; fixed in 32.3
- org.geotools:gt-wfs-ng (Maven): affected from 32.0; fixed in 32.3
- org.geotools:gt-wfs-ng (Maven): affected from 33.0; fixed in 33.1
- org.geotools:gt-wfs-ng (Maven): affected from 33.0; fixed in 33.1
- org.geotools:gt-xsd-core (Maven): affected all versions; fixed in 28.6.1
- org.geotools:gt-xsd-core (Maven): affected all versions; fixed in 28.6.1
- org.geotools:gt-xsd-core (Maven): affected from 29.0; fixed in 31.7
- org.geotools:gt-xsd-core (Maven): affected from 29.0; fixed in 31.7

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-826p-4gcg-35vw/ (Markdown: https://insights.sbomify.com/GHSA-826p-4gcg-35vw/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-826p-4gcg-35vw

---
From sbomify Insights: https://insights.sbomify.com/GHSA-826p-4gcg-35vw/
Summaries are generated and may contain mistakes; the official description above is the record.
