Unauthenticated Path Traversal in Hsclabs Mailinspector
CVE-2024-34470 is an unauthenticated path traversal vulnerability in Hsclabs Mailinspector versions prior to 5.2.19, allowing remote attackers to read arbitrary files from the server filesystem via the 'path' parameter in loader.php.
CVE search metadata
CVE search record: CVE-2024-34470. Severity: high. CVSS: 8.6. EPSS: 6.70%. KEV: no. Product: Mailinspector (< 5.2.19). Brief: Unauthenticated Path Traversal in Hsclabs Mailinspector. Brief link: https://feed.craftedsignal.io/briefs/2026-09-cve-2024-34470/
HSC Mailinspector versions up to and including 5.2.18 are vulnerable to an unauthenticated path traversal vulnerability (CVE-2024-34470). The issue resides in the '/public/loader.php' script, which fails to properly sanitize the 'path' parameter. An unauthenticated attacker can exploit this flaw to escape the application's web root directory and perform arbitrary file reads on the underlying server. Because the application processes the 'path' parameter without verifying if the requested resource resides within authorized directories, an attacker can access sensitive files such as '/etc/passwd' or application configuration files by supplying specially crafted directory traversal sequences (e.g., '../'). The widespread availability of proof-of-concept exploits on platforms such as GitHub and KitPloit significantly increases the likelihood of exploitation against internet-facing Mailinspector instances.
Attack Chain
- Attacker performs reconnaissance to identify internet-facing Mailinspector instances.
- Attacker crafts a malicious HTTP GET request targeting the '/mailinspector/public/loader.php' endpoint.
- The request includes a 'path' query parameter containing traversal sequences (e.g., '../../../../etc/passwd').
- The Mailinspector server receives the request and processes the 'loader.php' script.
- The script fails to validate the input, allowing the application to traverse outside the intended directory.
- The web server reads the contents of the requested file from the filesystem.
- The server returns the file content in the HTTP response, allowing the attacker to exfiltrate sensitive data.
Impact
Successful exploitation allows an unauthenticated attacker to read any file on the server to which the web application process has access. This can lead to the exposure of credentials, configuration files, system files, and proprietary data. In some cases, this exposure can provide sufficient information for an attacker to escalate privileges or gain full control of the affected server.
Recommendation
Prioritized actions for detection and remediation:
- Upgrade Hsclabs Mailinspector to version 5.2.19 or later to apply the official vendor patch.
- Deploy the provided Sigma rule to detect exploitation attempts targeting the 'path' parameter in 'loader.php'.
- Monitor web access logs for HTTP requests to '/public/loader.php' containing sequences like '..' or directory path patterns, particularly those that do not result in a 404 status.
- Implement a Web Application Firewall (WAF) rule to block requests to the 'loader.php' file containing path traversal characters (e.g., '../', '%2e%2e%2f').
Immediate actions
Upgrade all Hsclabs Mailinspector instances to 5.2.19 or later.
Mitigations
Apply WAF rules to block traversal sequences in the 'path' parameter of loader.php.
CVE-2024-34470
Detection coverage 1
Detect CVE-2024-34470 Exploitation - Path Traversal in Mailinspector
highDetects exploitation attempts against CVE-2024-34470 by monitoring for path traversal sequences in the 'path' parameter of the loader.php endpoint.
Detection queries are available on the platform. Get full rules →