GHSA-7qmg-grcp-qf25 CVE-2025-52465
GeoServer has an arbitrary file write vulnerability in its Master Password Dump Page
- Severity
- 7.2 / 10
- High · CVSS 3.1
- Exploit chance (EPSS)
- 0.62%
- Chance of exploitation in the next 30 days. Higher than 49.55% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-73 External Control of File Name or Path
- Fix
- Available
- 2 packages have a fixed version
Description
Summary
A vulnerability exists that allows an authenticated administrator with access to GeoServer's security system to pass arbitrary file names to the Master Password Dump web page and create files containing the master password in plaintext. The provided file name must be an absolute path to the target file, the target file can not already exist and all parent directories must already exist.
Details
When dumping the master password, GeoServer will use the provided file name with minimal validation as long as it is a java.io.File path. The only limitation is that the fix for a previous, unrelated vulnerability prevents relative path traversal here but absolute paths can be used to access arbitrary files. GeoServer does not enforce a maximum password length by default which allows an administrator to place malicious code into their password which could then be dumped into a JSP file.
Impact
Remote Code Execution (High severity)
This vulnerability can lead to executing arbitrary code if GeoServer is deployed in an environment where an attacker can dynamically deploy and execute a JSP file. This is possible if the geoserver.war file is simply placed into the webapps directory of a default Tomcat installation.
NTLM Hash Disclosure (Moderate severity)
If GeoServer is deployed in a Windows operating system and the GeoServer administrator does not already have access to the Windows account running the GeoServer process, it may be possible for the administrator to make GeoServer trigger an outbound NTLM request to a remote, attacker-controlled server and gain access to the NTLM hash or user password for use in future attacks.
Denial of Service (Low severity)
This vulnerability allows writing a file to any location where the GeoServer process has write permissions which could still potentially cause some kind of denial of service.
Mitigation
GeoServer installations where the web interface is either disabled or completely removed are not affected since the vulnerability exists in one of the web pages.
Resources
https://osgeo-org.atlassian.net/browse/GEOS-11852 https://github.com/geoserver/geoserver/pull/8584
Affected versions
Maven
| Package | Vulnerable | Fixed in |
|---|---|---|
| org.geoserver.web:gs-web-app | >= 2.27.0, < 2.27.3 |
2.27.3 |
| org.geoserver.web:gs-web-app | < 2.26.4 |
2.26.4 |
| org.geoserver.web:gs-web-sec-core | >= 2.27.0, < 2.27.3 |
2.27.3 |
| org.geoserver.web:gs-web-sec-core | < 2.26.4 |
2.26.4 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
org.geoserver.web:gs-web-app Maven → 2.27.3
- maven
<dependency><groupId>org.geoserver.web</groupId><artifactId>gs-web-app</artifactId><version>2.27.3</version></dependency>- gradle
implementation("org.geoserver.web:gs-web-app:2.27.3")
org.geoserver.web:gs-web-sec-core Maven → 2.27.3
- maven
<dependency><groupId>org.geoserver.web</groupId><artifactId>gs-web-sec-core</artifactId><version>2.27.3</version></dependency>- gradle
implementation("org.geoserver.web:gs-web-sec-core:2.27.3")
Severity breakdown
CVSS 3.1 7.2
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- High
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Weakness
CWE-73: External Control of File Name or Path
The product allows user input to control or influence paths or file names that are used in filesystem operations.
How to prevent it
- Architecture and Design: When the set of filenames is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames, and reject all other inputs. For example, ID 1 could map to "inbox.txt" and ID 2 could map to "profile.txt". Features such as the ESAPI AccessReferenceMap provide this capability.
- Architecture and Design, Operation: Run your code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict all access to files within a particular directory. Examples include the Unix chroot jail and AppArmor. In general, managed code may provide some protection. This may not be a feasible solution, and it only limits the impact to the operating system; the rest of your application may still be subject to compromise. Be careful to avoid CWE-243 and other weaknesses related to jails.
- Architecture and Design: For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
- Implementation: Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright. When validating filenames, use stringent allowlists that limit the character set to be used. If feasible, only allow a single "." character in the filename to avoid weaknesses such as CWE-23, and exclude directory separators such as "/" to avoid CWE-36. Use a list of allowable file extensions, which will help to avoid CWE-434. Do not rely exclusively on a filtering mechanism that removes potentially dangerous characters. This is equivalent to a denylist, which may be incomplete (CWE-184). For example, filtering "/" is insufficient protection if the filesystem also supports the use of "\" as a directory separator. Another possible error could occur when the filtering is applied in a way that still produces dangerous data (CWE-182). For example, if "../" sequences are removed from the ".../...//" string in a sequential fashion, two instances of "../" would b
- Implementation: Use a built-in path canonicalization function (such as realpath() in C) that produces the canonical version of the pathname, which effectively removes ".." sequences and symbolic links (CWE-23, CWE-59).
- Installation, Operation: Use OS-level permissions and run as a low-privileged user to limit the scope of any successful attack.
- Operation, Implementation: If you are using PHP, configure your application so that it does not use register_globals. During implementation, develop your application so that it does not rely on this feature, but be wary of implementing a register_globals emulation that is subject to weaknesses such as CWE-95, CWE-621, and similar issues.
- Testing: Use tools and techniques that require manual (human) analysis, such as penetration testing, threat modeling, and interactive tools that allow the tester to record and modify an active session. These may be more effective than strictly automated techniques. This is especially the case with weaknesses that are related to design and business rules.
References
Advisories
Packages
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-fjf5-xgmq-5525 GeoServer is vulnerable to Unauthenticated XML External Entities (XXE) attack via WMS GetMap feature | Critical Known exploited | Also affects org.geoserver.web:gs-web-app |
| GHSA-6jj6-gm7p-fcvv Remote Code Execution (RCE) vulnerability in geoserver | Critical Known exploited | Also affects org.geoserver.web:gs-web-app |
| GHSA-wf6j-gr27-g7ch GeoServer has a Server-Side Template Injection (SSTI) vulnerability in processing FreeMarker templates | High | Also affects org.geoserver.web:gs-web-app |
| GHSA-x4r9-gmw3-hxww GeoServer has a Server-Side Request Forgery (SSRF) Vulnerability in its XML Entity Resolution | High | Also affects org.geoserver.web:gs-web-app |
| GHSA-w66h-j855-qr72 GeoServer has a Reflected Cross-Site Scripting (XSS) vulnerability in its WMS GetFeatureInfo HTML format | Medium | Also affects org.geoserver.web:gs-web-app |
| GHSA-jj54-8f66-c5pc [XBOW-025-068] XML External Entity (XXE) Processing Vulnerability in GeoServer WFS Service | Critical | Also affects org.geoserver.web:gs-web-app |
| GHSA-gr67-pwcv-76gf GeoServer Infinite Loop Vulnerability in Jiffle process | High | Also affects org.geoserver.web:gs-web-app |
| GHSA-h86g-x8mm-78m5 GeoServer Missing Authorization on REST API Index | Medium | Also affects org.geoserver.web:gs-web-app |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor