# GHSA-2p76-gc46-5fvc: GeoNetwork affected by XML External Entity (XXE) processing vulnerability in WFS indexing REST API endpoint

> Unauthenticated attackers can exploit an XXE vulnerability in the WFS indexing API to read sensitive files from the server.

- **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:** 10 Jun 2025

## What is GHSA-2p76-gc46-5fvc?

GHSA-2p76-gc46-5fvc is a vulnerability in org.geonetwork-opensource:gn-web-app, published on 10 Jun 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

### Impact

GeoNetwork WFS Index functionality is affected by GeoTools XML External Entity (XXE) vulnerability during schema validation. 

This vulnerability is particularly severe as the REST API endpoint was not secured, potentially allowing unauthenticated attackers to read sensitive files 

### Patches

GeoNetwork 4.4.8 / 4.2.13.

### Workarounds

Remove the ``gn-wfsfeature-harvester`` and ``gn-camelPeriodicProducer``  jars, disabling the WFS Index functionality. 

### References

- [GHSA-826p-4gcg-35vw](https://github.com/geotools/geotools/security/advisories/GHSA-826p-4gcg-35vw)
- https://github.com/geonetwork/core-geonetwork/pull/8757
- https://github.com/geonetwork/core-geonetwork/pull/8803
- https://github.com/geonetwork/core-geonetwork/pull/8812

## Which versions are affected by GHSA-2p76-gc46-5fvc?

8 open source packages ship an affected version, including org.geonetwork-opensource:gn-web-app and org.geonetwork-opensource:gn-wfsfeature-harvester.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.geonetwork-opensource:gn-web-app` | Maven | From 4.2.0 | 4.2.13 |
| `org.geonetwork-opensource:gn-web-app` | Maven | From 4.2.0 | 4.2.13 |
| `org.geonetwork-opensource:gn-web-app` | Maven | From 4.4.0 | 4.4.8 |
| `org.geonetwork-opensource:gn-web-app` | Maven | From 4.4.0 | 4.4.8 |
| `org.geonetwork-opensource:gn-wfsfeature-harvester` | Maven | From 4.2.0 | 4.2.13 |
| `org.geonetwork-opensource:gn-wfsfeature-harvester` | Maven | From 4.2.0 | 4.2.13 |
| `org.geonetwork-opensource:gn-wfsfeature-harvester` | Maven | From 4.4.0 | 4.4.8 |
| `org.geonetwork-opensource:gn-wfsfeature-harvester` | Maven | From 4.4.0 | 4.4.8 |

## How do I fix GHSA-2p76-gc46-5fvc?

Upgrade org.geonetwork-opensource:gn-web-app to a fixed version for your release line: 4.2.13 or 4.4.8.

## Is GHSA-2p76-gc46-5fvc being exploited?

There is no known exploitation of GHSA-2p76-gc46-5fvc in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-2p76-gc46-5fvc and fix it if it is affected.

What it is: GHSA-2p76-gc46-5fvc is a vulnerability in org.geonetwork-opensource:gn-web-app, published on 10 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-2p76-gc46-5fvc in the wild and no public exploit code.

Affected packages and fixed versions:
- org.geonetwork-opensource:gn-web-app (Maven): affected from 4.2.0; fixed in 4.2.13
- org.geonetwork-opensource:gn-web-app (Maven): affected from 4.2.0; fixed in 4.2.13
- org.geonetwork-opensource:gn-web-app (Maven): affected from 4.4.0; fixed in 4.4.8
- org.geonetwork-opensource:gn-web-app (Maven): affected from 4.4.0; fixed in 4.4.8
- org.geonetwork-opensource:gn-wfsfeature-harvester (Maven): affected from 4.2.0; fixed in 4.2.13
- org.geonetwork-opensource:gn-wfsfeature-harvester (Maven): affected from 4.2.0; fixed in 4.2.13
- org.geonetwork-opensource:gn-wfsfeature-harvester (Maven): affected from 4.4.0; fixed in 4.4.8
- org.geonetwork-opensource:gn-wfsfeature-harvester (Maven): affected from 4.4.0; fixed in 4.4.8

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-2p76-gc46-5fvc/ (Markdown: https://insights.sbomify.com/GHSA-2p76-gc46-5fvc/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-2p76-gc46-5fvc

---
From sbomify Insights: https://insights.sbomify.com/GHSA-2p76-gc46-5fvc/
Summaries are generated and may contain mistakes; the official description above is the record.
