CVE-2018-20218

9.8 CRITICAL

📋 TL;DR

CVE-2018-20218 is a critical command injection vulnerability in Teracue ENC-400 devices that allows attackers to execute arbitrary shell commands via the password parameter in the login form. This affects all ENC-400 devices with firmware version 2.56 and below. Attackers can gain complete control of affected devices without authentication.

💻 Affected Systems

Products:
  • Teracue ENC-400
Versions: Firmware 2.56 and below
Operating Systems: Embedded Linux
Default Config Vulnerable: ⚠️ Yes
Notes: All default installations are vulnerable. The vulnerability exists in the web interface login mechanism.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise allowing attacker to install persistent backdoors, pivot to internal networks, exfiltrate data, or render devices inoperable.

🟠

Likely Case

Remote code execution leading to device takeover, credential theft, and use as attack platform against internal networks.

🟢

If Mitigated

Limited to login page access attempts if properly segmented and monitored.

🌐 Internet-Facing: HIGH - Exploitation requires no authentication and can be performed remotely via HTTP.
🏢 Internal Only: HIGH - Even internally, this provides immediate device compromise with minimal effort.

🎯 Exploit Status

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

Simple curl commands can exploit this vulnerability. Public exploit scripts are available in disclosure reports.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Firmware 2.57 or later

Vendor Advisory: https://www.teracue.com/en/support/security-advisories/

Restart Required: Yes

Instructions:

1. Download latest firmware from Teracue support portal. 2. Backup device configuration. 3. Upload firmware via web interface. 4. Apply firmware update. 5. Reboot device. 6. Restore configuration if needed.

🔧 Temporary Workarounds

Network Segmentation

all

Isolate ENC-400 devices from internet and restrict access to trusted management networks only.

Web Interface Disable

linux

Disable web management interface if not required, using CLI or serial console for management.

telnet <device_ip>
configure terminal
no web-management

🧯 If You Can't Patch

  • Implement strict network ACLs allowing only trusted IPs to access device management interface
  • Deploy WAF or reverse proxy with command injection filtering in front of devices

🔍 How to Verify

Check if Vulnerable:

Check firmware version via web interface at /system.html or via SSH/telnet using 'cat /etc/version'

Check Version:

ssh admin@<device_ip> 'cat /etc/version' or check web interface system page

Verify Fix Applied:

Confirm firmware version is 2.57 or higher and test login form with command injection payloads (e.g., password=test';id;')

📡 Detection & Monitoring

Log Indicators:

  • Unusual shell commands in system logs
  • Multiple failed login attempts with special characters
  • New user accounts or processes

Network Indicators:

  • HTTP POST requests to /check.lp with shell metacharacters in parameters
  • Outbound connections from device to unexpected destinations

SIEM Query:

source="enc-400" AND (url="/check.lp" AND (password="*;*" OR password="*|*" OR password="*`*"))

🔗 References

📤 Share & Export