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-2024-30851 Overview
CVE-2024-30851 is a directory traversal vulnerability in codesiddhant Jasmin Ransomware v1.0.1, an open-source ransomware simulation project hosted on GitHub. The flaw resides in the download_file.php component, which fails to sanitize user-supplied file paths. An unauthenticated remote attacker can traverse outside the intended directory and retrieve arbitrary files from the server hosting the Jasmin control panel. Because Jasmin is used as a red team and educational ransomware tool, exposed instances often store operator data, victim keys, and configuration secrets. The vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory.
Critical Impact
Unauthenticated attackers can read arbitrary files from the web server, including source code, configuration files, and ransomware operator data stored on disk.
Affected Products
- codesiddhant/Jasmin-Ransomware version 1.0.1
- The download_file.php component in the Jasmin control panel
- Web servers hosting the Jasmin Ransomware C2 interface
Discovery Timeline
- 2024-05-03 - CVE-2024-30851 published to the National Vulnerability Database
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-30851
Vulnerability Analysis
The vulnerability exists in download_file.php, a component of the Jasmin Ransomware control panel used to serve files back to operators. The script accepts a file name via HTTP request parameters and passes it to a file read operation without normalizing or validating the input path. An attacker can supply directory traversal sequences such as ../ to escape the intended download directory. The resulting HTTP response returns the contents of any file the web server process can read.
Exploitation requires no authentication and no user interaction. The attack is delivered over the network against the exposed control panel. Successful requests disclose sensitive files including PHP source, database configuration, private keys stored by the ransomware simulation, and operating system files such as /etc/passwd. A proof-of-concept has been published on GitHub by researcher chebuya, demonstrating the traversal payload against a live instance.
Root Cause
The root cause is missing input validation in download_file.php. The script trusts the user-controlled file parameter and does not enforce a canonical path check, allow-list of file names, or restriction to a base directory. This is a textbook CWE-22 implementation flaw where relative path traversal sequences are neither stripped nor rejected before the file system read.
Attack Vector
An attacker sends an HTTP GET request to the download_file.php endpoint with a file parameter containing traversal sequences. The web server, running under a PHP process with typical file system permissions, resolves the path and returns the target file contents in the response body. No credentials, tokens, or session state are required. Details of the exploitation flow are documented in the public proof-of-concept repository.
Detection Methods for CVE-2024-30851
Indicators of Compromise
- HTTP requests to download_file.php containing ../, ..%2F, or URL-encoded traversal sequences in the file query parameter
- Access log entries requesting sensitive paths such as /etc/passwd, wp-config.php, or .env files through the download endpoint
- Outbound file transfers of unusual size from the Jasmin control panel host
- Unexpected 200 OK responses from download_file.php for paths outside the intended download directory
Detection Strategies
- Deploy web application firewall rules that flag traversal patterns targeting download_file.php
- Review web server access logs for requests matching the CVE-2024-30851 payload signature
- Alert on any HTTP response from the Jasmin control panel that returns files with non-download MIME types
- Monitor for the presence of the Jasmin Ransomware download_file.php script on internal web hosts as an unauthorized asset indicator
Monitoring Recommendations
- Enable verbose HTTP request logging on any host running the Jasmin control panel
- Correlate file read events on the web root with inbound requests to identify traversal reads
- Ingest web server, host process, and file access telemetry into a centralized data lake for retrospective hunting
- Track EPSS trend data; the current EPSS score of 4.611% places CVE-2024-30851 in the 91st percentile for likelihood of exploitation activity
How to Mitigate CVE-2024-30851
Immediate Actions Required
- Take exposed Jasmin Ransomware v1.0.1 instances offline until they can be remediated or removed
- Restrict network access to the control panel using firewall rules or reverse proxy authentication
- Audit web servers for the presence of the codesiddhant/Jasmin-Ransomware project, which should not be deployed to production or internet-facing infrastructure
- Rotate any credentials, keys, or secrets stored on affected hosts, as they must be considered disclosed
Patch Information
No official vendor patch has been published for CVE-2024-30851. The affected repository is a research and educational ransomware simulation project. Refer to the upstream GitHub repository for the latest project state. Operators should remove the vulnerable version from any environment where it is deployed.
Workarounds
- Modify download_file.php to validate the file parameter against an allow-list of permitted file names
- Enforce a canonicalized base directory check using realpath() before opening any user-specified file
- Reject any request containing .., null bytes, or URL-encoded traversal sequences in file parameters
- Run the web server process under a restricted user account with read access limited to the intended download directory
# Example nginx configuration to block traversal patterns
location ~ /download_file\.php$ {
if ($args ~* "\.\./|\.\.%2f|%2e%2e") {
return 403;
}
deny all;
}
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

