CVE-2021-21804

9.8 CRITICAL

📋 TL;DR

This CVE describes a local file inclusion vulnerability in Advantech R-SeeNet's options.php script that allows attackers to execute arbitrary PHP code via crafted HTTP requests. Organizations using Advantech R-SeeNet version 2.4.12 (specifically the 20.10.2020 release) are affected. The vulnerability enables remote code execution with potentially severe consequences.

💻 Affected Systems

Products:
  • Advantech R-SeeNet
Versions: Version 2.4.12 (specifically the 20.10.2020 release)
Operating Systems: Windows (typical deployment)
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the options.php script functionality and affects the specific version mentioned; other versions may also be vulnerable but not confirmed.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise allowing attackers to execute arbitrary commands, install malware, exfiltrate sensitive data, and pivot to other network systems.

🟠

Likely Case

Unauthorized access to the R-SeeNet system leading to data theft, system manipulation, and potential lateral movement within the network.

🟢

If Mitigated

Limited impact due to network segmentation, proper access controls, and monitoring that detects exploitation attempts.

🌐 Internet-Facing: HIGH - The vulnerability can be exploited via HTTP requests, making internet-facing instances particularly vulnerable to remote attacks.
🏢 Internal Only: HIGH - Even internally accessible systems are vulnerable to attackers who gain network access or insider threats.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

The vulnerability requires sending crafted HTTP requests to the options.php endpoint; exploitation details are publicly available in the Talos Intelligence reports.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Check with Advantech for updated version

Vendor Advisory: https://www.advantech.com/support

Restart Required: Yes

Instructions:

1. Contact Advantech support for patch availability. 2. Backup current configuration. 3. Apply the provided patch. 4. Restart the R-SeeNet service. 5. Verify functionality.

🔧 Temporary Workarounds

Restrict Access to options.php

all

Block or restrict HTTP access to the vulnerable options.php script using web server configuration or network controls.

# For Apache: Add to .htaccess or httpd.conf
<Files "options.php">
    Order Deny,Allow
    Deny from all
</Files>
# For Nginx: Add to server block
location ~ /options\.php$ {
    deny all;
    return 403;
}

Network Segmentation

linux

Isolate R-SeeNet systems from untrusted networks and implement strict firewall rules.

# Example iptables rule to restrict access
# iptables -A INPUT -p tcp --dport 80 -s trusted_network -j ACCEPT
# iptables -A INPUT -p tcp --dport 80 -j DROP

🧯 If You Can't Patch

  • Implement strict network access controls to limit who can reach the R-SeeNet web interface
  • Deploy web application firewall (WAF) rules to block LFI exploitation patterns

🔍 How to Verify

Check if Vulnerable:

Check if R-SeeNet version is 2.4.12 (20.10.2020) via web interface or system documentation; test with controlled exploitation attempt in isolated environment.

Check Version:

Check web interface or consult system documentation; no universal command available.

Verify Fix Applied:

Verify version is updated beyond 2.4.12 (20.10.2020); test that crafted requests to options.php no longer execute arbitrary code.

📡 Detection & Monitoring

Log Indicators:

  • Unusual HTTP requests to options.php with file inclusion parameters
  • PHP error logs showing file inclusion attempts
  • Web server logs with suspicious patterns to vulnerable endpoint

Network Indicators:

  • HTTP traffic to options.php with unusual parameters
  • Multiple failed exploitation attempts from single source

SIEM Query:

source="web_server_logs" AND uri="*options.php*" AND (param="*../*" OR param="*php://*" OR param="*file=*")

🔗 References

📤 Share & Export