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.
Use CWE-78, Osgeo vendor hub and Geonetwork product page to widen CVE-2021-28398 into its surrounding weakness, vendor, and product context.
Compare it with CVE-2025-30220, CVE-2022-50899 and CVE-2024-32037 for nearby disclosures in the same product family.