CVE-2023-41765

8.1 HIGH

📋 TL;DR

This vulnerability allows remote attackers to execute arbitrary code on systems running vulnerable Layer 2 Tunneling Protocol (L2TP) implementations. Attackers can exploit this without authentication by sending specially crafted packets to vulnerable systems. This affects Windows systems with L2TP VPN functionality enabled.

💻 Affected Systems

Products:
  • Microsoft Windows
Versions: Windows 10, Windows 11, Windows Server 2019, Windows Server 2022
Operating Systems: Windows
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when L2TP VPN functionality is enabled and configured. Systems not using L2TP VPN are not affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise with SYSTEM/root privileges, enabling persistent access, data theft, lateral movement, and ransomware deployment across the network.

🟠

Likely Case

Remote code execution leading to initial foothold, credential harvesting, and installation of backdoors or malware on vulnerable systems.

🟢

If Mitigated

Denial of service or system instability if exploit attempts are blocked by network controls, but no code execution.

🌐 Internet-Facing: HIGH - Directly exploitable over the internet if L2TP VPN endpoints are exposed, requiring no authentication.
🏢 Internal Only: MEDIUM - Exploitable within internal networks, but requires attacker to have network access to vulnerable systems.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires sending specially crafted L2TP packets to vulnerable endpoints. No authentication required.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: October 2023 security updates (KB5031356 for Windows 10, KB5031354 for Windows 11, etc.)

Vendor Advisory: https://msrc.microsoft.com/update-guide/vulnerability/CVE-2023-41765

Restart Required: Yes

Instructions:

1. Apply October 2023 Windows security updates via Windows Update. 2. For enterprise environments, deploy updates through WSUS or SCCM. 3. Restart systems after update installation.

🔧 Temporary Workarounds

Disable L2TP VPN

windows

Disable L2TP VPN functionality if not required

netsh ras set tracing l2tp disabled
Disable L2TP in VPN server configuration

Block L2TP ports

linux

Block UDP ports 1701 and 500 at network perimeter

firewall-cmd --permanent --add-rich-rule='rule protocol value="udp" port port="1701" drop'
firewall-cmd --permanent --add-rich-rule='rule protocol value="udp" port port="500" drop'
firewall-cmd --reload

🧯 If You Can't Patch

  • Disable L2TP VPN functionality on all vulnerable systems
  • Implement network segmentation to isolate L2TP VPN endpoints from critical systems

🔍 How to Verify

Check if Vulnerable:

Check if L2TP VPN is enabled and system has not applied October 2023 security updates

Check Version:

wmic qfe list | findstr KB5031356 (Windows 10) or systeminfo | findstr KB5031354 (Windows 11)

Verify Fix Applied:

Verify October 2023 security updates are installed and L2TP service is either disabled or patched

📡 Detection & Monitoring

Log Indicators:

  • Unusual L2TP connection attempts
  • VPN service crashes
  • Security event logs showing unexpected process creation

Network Indicators:

  • Malformed L2TP packets to UDP port 1701
  • Unusual traffic patterns to VPN endpoints

SIEM Query:

source="windows" AND (event_id=4688 OR event_id=4625) AND process_name="svchost.exe" AND command_line="*L2TP*"

🔗 References

📤 Share & Export