CVE-2021-31251
📋 TL;DR
This CVE describes an authentication bypass vulnerability in CHIYU Technology's telnet server implementation for specific IoT converter devices. Attackers can send specially crafted requests to establish privileged connections without valid credentials, potentially gaining full control of affected devices. Organizations using BF-430, BF-431, BF-450M, or SEMAC devices from CHIYU Technology are affected.
💻 Affected Systems
- BF-430 TCP/IP Converter
- BF-431 232/422 TCP/IP Converter
- BF-450M
- SEMAC
📦 What is this software?
Bf 430 Firmware by Chiyu Tech
Bf 431 Firmware by Chiyu Tech
Bf 450m Firmware by Chiyu Tech
Semac D1 Firmware by Chiyu Tech
Semac D2 Firmware by Chiyu Tech
Semac D4 Firmware by Chiyu Tech
Semac S2 Firmware by Chiyu Tech
⚠️ Risk & Real-World Impact
Worst Case
Complete device compromise allowing attackers to reconfigure devices, intercept/modify data streams, use devices as network pivots, or deploy persistent malware on the device firmware.
Likely Case
Unauthorized access to device configuration, potential data interception from serial communications, and device manipulation affecting connected industrial/automation systems.
If Mitigated
Limited impact if devices are behind firewalls with strict network segmentation and telnet access is blocked at network boundaries.
🎯 Exploit Status
Exploitation requires sending a specific malformed request to the telnet server. Public technical details and proof-of-concept code are available in security advisories.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Firmware updates released by CHIYU Technology (specific version numbers should be verified from vendor advisory)
Vendor Advisory: https://www.chiyu-tech.com/msg/message-Firmware-update-87.html
Restart Required: Yes
Instructions:
1. Download latest firmware from CHIYU Technology website. 2. Access device management interface. 3. Upload and apply firmware update. 4. Reboot device. 5. Verify telnet authentication now requires valid credentials.
🔧 Temporary Workarounds
Disable Telnet Service
allCompletely disable telnet access if not required for operations
Access device web interface -> Network Settings -> Services -> Disable Telnet
Network Access Control
linux/windowsRestrict telnet port (23) access using firewall rules
iptables -A INPUT -p tcp --dport 23 -j DROP
netsh advfirewall firewall add rule name="Block Telnet" dir=in action=block protocol=TCP localport=23
🧯 If You Can't Patch
- Segment affected devices into isolated VLANs with strict firewall rules blocking all unnecessary inbound connections
- Implement network monitoring for telnet traffic to/from affected devices and alert on authentication bypass patterns
🔍 How to Verify
Check if Vulnerable:
Attempt telnet connection to device port 23 and send malformed authentication request as described in public advisories. If connection is established without valid credentials, device is vulnerable.
Check Version:
Check device web interface or serial console for firmware version, or use: telnet [device_ip] 23 and examine banner if available
Verify Fix Applied:
After patching, attempt the same exploit - connection should fail or require valid authentication credentials.
📡 Detection & Monitoring
Log Indicators:
- Failed authentication attempts followed by successful privileged access
- Telnet connections from unexpected sources
- Malformed telnet packets in network logs
Network Indicators:
- Telnet traffic to port 23 with specific payload patterns matching exploit
- Unusual telnet session establishment without preceding authentication exchange
SIEM Query:
source_port=23 AND (payload_contains="malformed_auth_pattern" OR (event_type="connection_success" AND NOT preceding_event="auth_success"))
🔗 References
- https://gitbook.seguranca-informatica.pt/cve-and-exploits/cves/chiyu-iot-devices#cve-2021-31251
- https://seguranca-informatica.pt/dancing-in-the-iot-chiyu-devices-vulnerable-to-remote-attacks/#.YLqK1KhKguU
- https://www.chiyu-tech.com/msg/message-Firmware-update-87.html
- https://gitbook.seguranca-informatica.pt/cve-and-exploits/cves/chiyu-iot-devices#cve-2021-31251
- https://seguranca-informatica.pt/dancing-in-the-iot-chiyu-devices-vulnerable-to-remote-attacks/#.YLqK1KhKguU
- https://www.chiyu-tech.com/msg/message-Firmware-update-87.html