CVE-2024-7896
๐ TL;DR
This critical vulnerability in Tosei Online Store Management System allows remote attackers to execute arbitrary commands via command injection in the /cgi-bin/p1_ftpserver.php file by manipulating the adr_txt parameter. Attackers can exploit this to gain unauthorized access and control over affected systems. Organizations using versions 4.02-4.04 of this software are at risk.
๐ป Affected Systems
- Tosei Online Store Management System (ใใใๅบ่็ฎก็ใทในใใ )
๐ฆ What is this software?
Online Store Management System by Tosei Corporation
Online Store Management System by Tosei Corporation
Online Store Management System by Tosei Corporation
โ ๏ธ Risk & Real-World Impact
Worst Case
Full system compromise allowing attackers to execute arbitrary commands with web server privileges, potentially leading to data theft, ransomware deployment, or complete system takeover.
Likely Case
Remote code execution leading to web shell installation, data exfiltration, and lateral movement within the network.
If Mitigated
Limited impact if proper network segmentation, web application firewalls, and least privilege principles are implemented.
๐ฏ Exploit Status
Exploit code is publicly available. Attack requires no authentication and has low technical complexity.
๐ ๏ธ Fix & Mitigation
โ Official Fix
Patch Version: Unknown
Vendor Advisory: None available
Restart Required: No
Instructions:
No official patch available. Vendor has not responded to disclosure. Consider workarounds or system replacement.
๐ง Temporary Workarounds
Block access to vulnerable endpoint
allRestrict access to /cgi-bin/p1_ftpserver.php using web server configuration or firewall rules
# Apache: RewriteRule ^/cgi-bin/p1_ftpserver\.php$ - [F,L]
# Nginx: location ~ ^/cgi-bin/p1_ftpserver\.php$ { return 403; }
Input validation and sanitization
allImplement strict input validation for the adr_txt parameter to prevent command injection
# PHP example: filter_var($_POST['adr_txt'], FILTER_VALIDATE_IP) for IP addresses
# Alternative: preg_match('/^[a-zA-Z0-9\.\-]+$/', $input)
๐งฏ If You Can't Patch
- Isolate affected systems in a separate network segment with strict firewall rules
- Implement a web application firewall (WAF) with command injection protection rules
๐ How to Verify
Check if Vulnerable:
Check if /cgi-bin/p1_ftpserver.php exists and is accessible. Review system version in admin panel or configuration files.
Check Version:
# Check version in admin interface or configuration files. No standard command available.
Verify Fix Applied:
Test if command injection is possible by attempting to inject commands via adr_txt parameter. Use security scanning tools.
๐ก Detection & Monitoring
Log Indicators:
- Unusual POST requests to /cgi-bin/p1_ftpserver.php with shell metacharacters
- Commands like ';', '|', '&', '`' in adr_txt parameter
- Unexpected process execution from web server user
Network Indicators:
- Outbound connections from web server to unknown IPs
- Unusual traffic patterns from /cgi-bin/p1_ftpserver.php endpoint
SIEM Query:
source="web_server" AND (uri="/cgi-bin/p1_ftpserver.php" AND (param="adr_txt" AND value MATCH "[;&|`$()]"))