Summary
GeoNetwork exposes an API endpoint for creating formatters through file upload without sufficient authorization checks. An unauthenticated attacker may upload arbitrary XSL or ZIP formatter files and write files into the server's formatter directory.
Affected context
The vulnerability occurs in GeoNetwork deployments where the formatter-creation upload endpoint is reachable without authentication or authorization enforcement. It affects configurations that allow uploaded formatter files to be written directly into the server's formatter directory, creating an unauthorized write path to application storage.
Exploit preconditions
- Attack surface: Publicly reachable GeoNetwork formatter-upload API endpoint
- Required access: No authentication is required when the endpoint is exposed without access controls
- Trigger point: Submission of a formatter file through the formatter-creation operation
- Why exploitation is possible: The endpoint does not adequately verify whether the requester is permitted to create formatters or write files to the formatter directory
Why this happens
The underlying bug is a missing authorization check on a file-upload operation. The application accepts formatter files from an unauthenticated requester and permits them to be stored in a privileged application directory.
This maps to CWE-862: Missing Authorization, where the application performs a protected action without verifying that the requester has the required permission. The insecure pattern combines an exposed write-capable endpoint with insufficient enforcement of the intended administrative trust boundary.
Potential impact
- An attacker may write arbitrary files within the formatter directory
- Application behavior may be altered through unauthorized formatter content
- The server's storage may be used to host or replace application resources
- Additional compromise could occur if another weakness causes uploaded content to be interpreted as executable
- Integrity of catalog presentation and spatial-resource processing may be affected
General mitigation guidance
Mitigation generally focuses on enforcing authorization before any formatter creation or file-writing operation is performed.
Common defensive patterns include:
- Requiring authenticated, explicitly authorized administrative access for formatter uploads
- Applying deny-by-default access controls to management and upload endpoints
- Validating uploaded files against a strict formatter schema and expected file types
- Storing uploads outside executable or application-controlled directories where feasible
- Using controlled naming, path normalization, and destination isolation to prevent unintended writes
- Running the application with only the filesystem permissions it requires
- Limiting public exposure of administrative APIs through network policy and gateway controls
How teams detect issues like this
Organizations can detect this class of issue through:
- Static analysis and route reviews that identify upload handlers lacking authorization middleware
- Code review checks for file writes performed before identity and permission validation
- API inventories that flag publicly reachable management or formatter-creation endpoints
- Web-application testing that verifies unauthenticated requests cannot create or modify formatter resources
- File-integrity monitoring on formatter directories and alerts for unexpected ownership, names, or content
- Policy enforcement requiring explicit authorization annotations for all write-capable API routes

