# 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 O…

- Severity: High 7.2 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.50%, higher than 75% of CVEs (2026-12-01)
- Published: 2022-09-05T16:09:29.000Z
- Modified: 2026-06-17T03:46:18.973Z
- Weaknesses: CWE-78
- Assigned by: mitre

## 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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- osgeo geonetwork: from 3.4.0 before 3.12.0; from 4.0.0 before 4.0.4; 4.0.0

## References

- <https://geonetwork-opensource.org/> (product)
- <https://github.com/geonetwork/core-geonetwork> (third-party-advisory)
- <https://geonetwork-opensource.org/manuals/trunk/en/overview/change-log/version-3.6.0.html> (patch, release-notes, vendor-advisory)
- <https://github.com/geonetwork/core-geonetwork/security/advisories/GHSA-cf8p-c88c-h9jf> (mitigation, patch, third-party-advisory)

## Sources

- CVE List: [CVE-2021-28398](https://www.cve.org/CVERecord?id=CVE-2021-28398), CVE Terms of Use, modified 2024-08-03
- NVD: [CVE-2021-28398](https://nvd.nist.gov/vuln/detail/CVE-2021-28398), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-28398 · Whole record: https://cve.day/CVE-2021-28398.json · Rebuilt by cve.day 2026-11-25T22:58:07.818Z
