CVE-2021-47899 Overview
CVE-2021-47899 is a Server-Side Request Forgery (SSRF) vulnerability affecting YetiShare File Hosting Script version 5.1.0. This vulnerability allows remote attackers to read local system files through the remote file upload feature by exploiting the url parameter in the url_upload_handler endpoint. Attackers can leverage the file:/// protocol to access sensitive files such as /etc/passwd, potentially exposing critical system information and credentials.
Critical Impact
Unauthenticated attackers can exploit this SSRF vulnerability to read sensitive local files from the server, potentially leading to information disclosure, credential theft, and further system compromise.
Affected Products
- YetiShare File Hosting Script 5.1.0
Discovery Timeline
- 2026-01-23 - CVE CVE-2021-47899 published to NVD
- 2026-01-26 - Last updated in NVD database
Technical Details for CVE-2021-47899
Vulnerability Analysis
This vulnerability exists in YetiShare File Hosting Script's remote file upload functionality. The application fails to properly validate and sanitize URLs submitted through the url_upload_handler endpoint, allowing attackers to submit arbitrary URLs including those using the file:/// protocol scheme. When the server processes these malicious requests, it reads local file contents and returns them to the attacker.
The SSRF vulnerability enables attackers to bypass network-based access controls and interact with internal services or read local files that should not be accessible from external networks. This type of vulnerability is particularly dangerous in file hosting applications as they inherently need to fetch remote content.
Root Cause
The root cause of this vulnerability is improper input validation in the URL upload handler. The application does not implement adequate URL scheme validation or whitelisting, allowing the file:/// protocol to be processed alongside legitimate HTTP/HTTPS URLs. The url parameter accepts arbitrary input without checking whether the requested resource is from an allowed domain or protocol, leading to unauthorized file access.
Attack Vector
The attack is conducted over the network without requiring authentication. An attacker crafts a malicious HTTP request to the url_upload_handler endpoint, supplying a file:/// URL pointing to a sensitive local file (such as /etc/passwd, /etc/shadow, or application configuration files). The server processes this request and returns the contents of the specified file to the attacker.
The exploitation flow involves:
- Identifying the vulnerable url_upload_handler endpoint
- Crafting a request with the url parameter set to a file:/// path
- Receiving the contents of the targeted local file in the server response
- Using disclosed information for further attacks
A public exploit is available on Exploit-DB #49534 demonstrating this attack technique.
Detection Methods for CVE-2021-47899
Indicators of Compromise
- HTTP requests to url_upload_handler endpoints containing file:/// protocol schemes
- Requests with URL parameters attempting to access system files like /etc/passwd, /etc/shadow, or configuration files
- Unusual server-side file access patterns in application logs
- Network traffic containing local file path references in URL parameters
Detection Strategies
- Monitor web application logs for requests containing file:///, dict://, gopher://, or other non-HTTP protocol schemes in URL parameters
- Implement Web Application Firewall (WAF) rules to detect and block SSRF patterns targeting local file paths
- Deploy endpoint detection solutions to identify suspicious file read operations initiated by web server processes
- Review access logs for the url_upload_handler endpoint for anomalous request patterns
Monitoring Recommendations
- Enable verbose logging for the YetiShare application to capture all URL upload requests
- Configure alerting for any requests containing protocol schemes other than HTTP/HTTPS
- Monitor system file access events for reads initiated by the web server process
- Implement network-level monitoring to detect internal service access from the web application
How to Mitigate CVE-2021-47899
Immediate Actions Required
- Upgrade YetiShare File Hosting Script to the latest available version that addresses this vulnerability
- Implement URL scheme whitelisting to only allow HTTP and HTTPS protocols in the upload handler
- Deploy WAF rules to block requests containing file:/// and other dangerous protocol schemes
- Restrict network access to the vulnerable endpoint if remote file upload is not required
Patch Information
Organizations running YetiShare File Hosting Script 5.1.0 should check the YetiShare Official Site and MF Scripts Resource Site for updated versions that address this vulnerability. Apply all available security patches and updates as soon as possible. Additional technical details can be found in the VulnCheck YetiShare Advisory.
Workarounds
- Disable the remote file upload feature entirely if not required for business operations
- Implement application-level URL validation to whitelist only HTTP/HTTPS protocols and external domains
- Deploy a reverse proxy or WAF in front of the application configured to filter SSRF attack patterns
- Restrict the web server's ability to access local files through OS-level permissions or containerization
# Example WAF rule to block file:// protocol in requests
# For ModSecurity:
SecRule ARGS "@contains file://" "id:1001,phase:2,deny,status:403,msg:'SSRF attempt blocked - file protocol detected'"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

