CVE-2021-27165

9.8 CRITICAL

📋 TL;DR

CVE-2021-27165 is a critical authentication bypass vulnerability affecting FiberHome HG6245D optical network terminals. Attackers can exploit hardcoded telnet credentials (gpon/gpon) to gain unauthorized administrative access to affected devices. This affects all FiberHome HG6245D devices through firmware version RP2613.

💻 Affected Systems

Products:
  • FiberHome HG6245D
Versions: All versions through RP2613
Operating Systems: Embedded Linux
Default Config Vulnerable: ⚠️ Yes
Notes: Affects devices with telnet service enabled (default configuration). Some ISPs may have disabled telnet in custom firmware.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete device compromise allowing attackers to intercept/modify network traffic, deploy persistent malware, pivot to internal networks, or disable internet connectivity for all connected users.

🟠

Likely Case

Unauthorized administrative access leading to network traffic monitoring, DNS hijacking, credential theft, and potential lateral movement to connected devices.

🟢

If Mitigated

Limited impact with proper network segmentation and telnet disabled, though device remains vulnerable to local network attacks.

🌐 Internet-Facing: HIGH - Telnet port 23 is typically exposed on WAN interfaces, allowing direct internet exploitation.
🏢 Internal Only: HIGH - Even if not internet-facing, attackers on local network can exploit this vulnerability.

🎯 Exploit Status

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

Simple telnet connection with hardcoded credentials. No special tools or skills required.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Firmware versions after RP2613

Vendor Advisory: https://www.fiberhome.com/security/ (vendor advisory not publicly accessible)

Restart Required: Yes

Instructions:

1. Contact ISP for firmware update. 2. Download latest firmware from ISP portal. 3. Access device admin interface. 4. Navigate to firmware update section. 5. Upload new firmware file. 6. Wait for automatic reboot.

🔧 Temporary Workarounds

Disable Telnet Service

linux

Disable telnet daemon to prevent credential-based attacks

telnetd -l /bin/sh -p 23 (to check if running)
killall telnetd
remove telnetd from startup scripts

Block Telnet Port

linux

Use firewall rules to block telnet port 23

iptables -A INPUT -p tcp --dport 23 -j DROP
iptables -A OUTPUT -p tcp --dport 23 -j DROP

🧯 If You Can't Patch

  • Segment affected devices on isolated VLAN to limit lateral movement
  • Implement network monitoring for telnet connections to port 23

🔍 How to Verify

Check if Vulnerable:

Attempt telnet connection: 'telnet [device_ip] 23' then enter credentials 'gpon'/'gpon'. If login succeeds, device is vulnerable.

Check Version:

telnet [device_ip] 23, login with admin credentials, then run 'cat /etc/version' or check web interface

Verify Fix Applied:

Attempt telnet login with gpon/gpon credentials - should fail. Check firmware version is newer than RP2613.

📡 Detection & Monitoring

Log Indicators:

  • Failed telnet authentication attempts
  • Successful telnet logins from unexpected sources
  • Multiple telnet connection attempts

Network Indicators:

  • Telnet traffic to port 23 from external IPs
  • Unusual telnet session durations
  • Telnet connections followed by suspicious commands

SIEM Query:

source="firewall" dest_port=23 AND (action="allow" OR status="success")

🔗 References

📤 Share & Export