CVE-2023-31814

9.8 CRITICAL

📋 TL;DR

This CVE describes a file inclusion vulnerability in D-Link DIR-300 routers that allows attackers to include arbitrary files from the filesystem via the /model/__lang_msg.php endpoint. Attackers can potentially read sensitive files, execute code, or compromise the router. All users with affected firmware versions are vulnerable.

💻 Affected Systems

Products:
  • D-Link DIR-300
Versions: Firmware <= REVA1.06 and <= REVB2.06
Operating Systems: Embedded Linux (router firmware)
Default Config Vulnerable: ⚠️ Yes
Notes: All default configurations are vulnerable. Both hardware revisions (REVA and REVB) are affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete router compromise, credential theft, network pivoting, and persistent backdoor installation.

🟠

Likely Case

Sensitive file disclosure (configuration files, credentials), router configuration manipulation, and potential code execution.

🟢

If Mitigated

Limited impact if router is behind firewall with no WAN access and strong network segmentation.

🌐 Internet-Facing: HIGH - Routers are typically internet-facing devices with direct WAN exposure.
🏢 Internal Only: MEDIUM - Still vulnerable to internal attackers or compromised internal systems.

🎯 Exploit Status

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

Exploit requires simple HTTP requests to vulnerable endpoint. Public proof-of-concept demonstrates file inclusion.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Check D-Link website for latest firmware > REVA1.06 and > REVB2.06

Vendor Advisory: https://www.dlink.com/en/security-bulletin/

Restart Required: Yes

Instructions:

1. Visit D-Link support site. 2. Download latest firmware for your DIR-300 hardware revision. 3. Log into router admin interface. 4. Navigate to firmware update section. 5. Upload and apply new firmware. 6. Router will reboot automatically.

🔧 Temporary Workarounds

Block External Access

all

Configure firewall to block WAN access to router admin interface

Disable Remote Management

all

Turn off remote management in router settings

🧯 If You Can't Patch

  • Isolate router on separate VLAN with strict firewall rules
  • Replace with supported router model if firmware updates unavailable

🔍 How to Verify

Check if Vulnerable:

Check firmware version in router admin interface under System or Maintenance section

Check Version:

Login to router web interface and check System Information page

Verify Fix Applied:

Verify firmware version is greater than affected versions after update

📡 Detection & Monitoring

Log Indicators:

  • HTTP requests to /model/__lang_msg.php with file parameters
  • Unusual file access patterns in router logs

Network Indicators:

  • HTTP requests to router IP on port 80/443 with file inclusion patterns
  • Unusual outbound connections from router

SIEM Query:

http.url:*__lang_msg.php* AND (http.uri:*file=* OR http.uri:*path=*)

🔗 References

📤 Share & Export