Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2025-6109 Overview
CVE-2025-6109 is a path traversal vulnerability [CWE-22] in javahongxi whatsmars version 2021.4.0. The flaw resides in the initialize function of /whatsmars-archetypes/whatsmars-initializr/src/main/java/org/hongxi/whatsmars/initializr/controller/InitializrController.java. An attacker can manipulate the artifactId parameter to traverse directories outside the intended scope. The attack is launchable remotely and requires low privileges, with no user interaction. The exploit has been publicly disclosed. The vendor was contacted but did not respond to the disclosure.
Critical Impact
Remote attackers with low privileges can abuse the artifactId parameter to access files outside the intended directory, leading to limited information disclosure in whatsmars 2021.4.0.
Affected Products
- javahongxi whatsmars 2021.4.0
- Component: whatsmars-initializr module
- File: InitializrController.java (initialize function)
Discovery Timeline
- 2025-06-16 - CVE-2025-6109 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-6109
Vulnerability Analysis
The vulnerability affects the InitializrController component of the whatsmars project, a Spring Initializr-style scaffolding service. The initialize endpoint accepts an artifactId parameter from HTTP requests. The server uses this parameter when constructing file paths without proper sanitization of traversal sequences. An attacker supplying crafted input such as ../ sequences can escape the intended working directory. Impact is limited to confidentiality, with no integrity or availability consequence according to the vendor-assigned scoring.
Root Cause
The root cause is insufficient input validation on the artifactId request parameter inside the initialize method. The code does not canonicalize paths or reject traversal metacharacters before using the value in file system operations. This matches the pattern described in CWE-22: Improper Limitation of a Pathname to a Restricted Directory.
Attack Vector
The attack is executed remotely over the network against any exposed whatsmars initializr instance. An authenticated attacker with low privileges sends an HTTP request to the vulnerable endpoint, placing path traversal sequences in the artifactId field. The service then performs file operations on resources outside the intended archetype directory. A public proof of concept is available at the ShenxiuSec PoC repository, with reproduction steps documented alongside it.
No verified exploitation code is reproduced here. See the external PoC references for technical details.
Detection Methods for CVE-2025-6109
Indicators of Compromise
- HTTP requests to the whatsmars initializr initialize endpoint containing ../, ..\\, or URL-encoded variants (%2e%2e%2f) in the artifactId parameter.
- Unexpected file reads or writes performed by the whatsmars Java process outside the archetype template directory.
- Access log entries containing abnormally long or encoded artifactId values originating from untrusted networks.
Detection Strategies
- Deploy web application firewall rules that inspect the artifactId parameter for path traversal metacharacters and reject non-alphanumeric values.
- Enable application-level request logging on the InitializrController and alert on parameters that fail Maven artifactId naming conventions.
- Correlate HTTP access logs with file system audit events to detect out-of-scope path accesses by the whatsmars service user.
Monitoring Recommendations
- Monitor outbound responses from the initializr service for file content that does not match expected archetype templates.
- Review authentication logs for low-privileged accounts issuing repeated initialize requests, which may indicate reconnaissance.
- Baseline normal artifactId values and alert on deviations such as directory separators or percent-encoded sequences.
How to Mitigate CVE-2025-6109
Immediate Actions Required
- Restrict network access to the whatsmars initializr endpoint to trusted internal networks or developers only.
- Remove or disable the whatsmars-initializr module in production deployments if it is not required.
- Apply input validation at a reverse proxy to reject any artifactId value containing path separators or traversal sequences.
Patch Information
No official vendor patch has been published. The project maintainer did not respond to the disclosure request submitted through VulDB. Users should track upstream commits in the whatsmars repository and apply a corrective fix that canonicalizes the artifactId against an allowlist pattern (for example, [A-Za-z0-9_.-]+). Additional vulnerability tracking information is available in VulDB entry 312578.
Workarounds
- Enforce a strict regular expression allowlist on the artifactId parameter before it reaches the controller logic.
- Run the whatsmars Java process under a dedicated low-privilege account with file system access limited to the archetype templates directory.
- Place the service behind an authenticated reverse proxy and block requests whose parameters contain .., /, or \\ sequences.
# Example NGINX rule to block path traversal patterns in artifactId
if ($arg_artifactId ~* "(\.\./|\.\.\\|%2e%2e)") {
return 400;
}
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

