CVE-2020-13432
📋 TL;DR
This vulnerability in rejetto HFS (HTTP File Server) allows remote attackers to trigger a buffer overflow via concurrent HTTP requests with long URIs or headers when virtual files/folders are used. It affects HFS v2.3m Build #300, potentially causing denial of service or arbitrary code execution. Anyone running this specific version with virtual files/folders enabled is vulnerable.
💻 Affected Systems
- rejetto HFS (HTTP File Server)
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution leading to complete system compromise
Likely Case
Denial of service causing application crashes and service disruption
If Mitigated
Limited to denial of service if exploit fails to achieve code execution
🎯 Exploit Status
Public exploit code available, requires concurrent requests to trigger
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Fixed in commit b8ebfc4e22948e1a61506cd66e397b61ea5ea5de
Vendor Advisory: https://github.com/rejetto/hfs2/commit/b8ebfc4e22948e1a61506cd66e397b61ea5ea5de
Restart Required: Yes
Instructions:
1. Download latest HFS version from official repository 2. Replace existing installation 3. Restart HFS service
🔧 Temporary Workarounds
Disable virtual files/folders
allDisable the virtual files and folders feature in HFS configuration
Edit hfs.ini and set virtual_folders=false
Implement request filtering
allUse reverse proxy or WAF to filter long URIs and headers
Configure nginx/apache to limit request_line_size and large_client_header_buffers
🧯 If You Can't Patch
- Isolate HFS server in separate network segment with strict firewall rules
- Implement rate limiting to prevent concurrent exploitation attempts
🔍 How to Verify
Check if Vulnerable:
Check HFS version in web interface or about dialog, verify if running v2.3m Build #300
Check Version:
Check HFS web interface or examine hfs.exe properties on Windows
Verify Fix Applied:
Verify version is newer than v2.3m Build #300 or check for commit b8ebfc4e in installation
📡 Detection & Monitoring
Log Indicators:
- Multiple concurrent requests with long URIs (>1024 chars)
- Application crash logs
- Access violation errors in Windows Event Log
Network Indicators:
- HTTP requests with unusually long URIs or headers
- Multiple concurrent connections to HFS port
SIEM Query:
source="hfs.log" AND (uri_length>1024 OR header_length>4096)
🔗 References
- http://hyp3rlinx.altervista.org/advisories/HFS-HTTP-FILE-SERVER-v2.3-REMOTE-BUFFER-OVERFLOW-DoS.txt
- http://packetstormsecurity.com/files/157980/HFS-Http-File-Server-2.3m-Build-300-Buffer-Overflow.html
- http://seclists.org/fulldisclosure/2020/Jun/13
- http://seclists.org/fulldisclosure/2021/Apr/12
- https://github.com/rejetto/hfs2/commit/b8ebfc4e22948e1a61506cd66e397b61ea5ea5de
- https://packetstormsecurity.com/files/157980/HFS-Http-File-Server-2.3m-Build-300-Buffer-Overflow.html
- https://www.rejetto.com/hfs/?f=wn
- http://hyp3rlinx.altervista.org/advisories/HFS-HTTP-FILE-SERVER-v2.3-REMOTE-BUFFER-OVERFLOW-DoS.txt
- http://packetstormsecurity.com/files/157980/HFS-Http-File-Server-2.3m-Build-300-Buffer-Overflow.html
- http://seclists.org/fulldisclosure/2020/Jun/13
- http://seclists.org/fulldisclosure/2021/Apr/12
- https://github.com/rejetto/hfs2/commit/b8ebfc4e22948e1a61506cd66e397b61ea5ea5de
- https://packetstormsecurity.com/files/157980/HFS-Http-File-Server-2.3m-Build-300-Buffer-Overflow.html
- https://www.rejetto.com/hfs/?f=wn