CVE-2024-38138

7.5 HIGH

📋 TL;DR

This vulnerability allows remote attackers to execute arbitrary code on Windows systems running Windows Deployment Services (WDS). Attackers can exploit this without authentication to gain SYSTEM privileges on affected servers. Organizations using WDS for network-based Windows installations are primarily affected.

💻 Affected Systems

Products:
  • Windows Deployment Services
Versions: Windows Server 2019, Windows Server 2022, Windows Server 2025
Operating Systems: Windows Server
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems with Windows Deployment Services role installed and enabled. Client Windows versions are not affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of WDS server with SYSTEM privileges, enabling lateral movement across the network, deployment of ransomware, or persistent backdoors.

🟠

Likely Case

Attacker gains initial foothold on network via WDS server, then pivots to other systems to steal credentials, deploy malware, or disrupt deployment operations.

🟢

If Mitigated

Limited impact due to network segmentation, WDS server isolation, and proper access controls preventing lateral movement.

🌐 Internet-Facing: HIGH if WDS is exposed to internet (rare configuration). Attackers can directly exploit without internal access.
🏢 Internal Only: HIGH as WDS servers are typically internal but accessible to authenticated users; exploitation could spread across network.

🎯 Exploit Status

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

Microsoft rates this as 'Exploitation More Likely' in their advisory. The CWE-416 (Use After Free) suggests memory corruption vulnerability.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: July 2024 security updates (KB5040442 for Server 2019, KB5040434 for Server 2022, KB5040437 for Server 2025)

Vendor Advisory: https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-38138

Restart Required: Yes

Instructions:

1. Apply July 2024 Windows Server security updates via Windows Update. 2. Restart affected servers. 3. Verify WDS service restarts properly after reboot.

🔧 Temporary Workarounds

Disable Windows Deployment Services

windows

Temporarily disable WDS service if not actively needed for deployments

Stop-Service WDSServer
Set-Service WDSServer -StartupType Disabled

Network Segmentation

all

Restrict network access to WDS servers to only required management and client systems

🧯 If You Can't Patch

  • Isolate WDS servers in separate VLAN with strict firewall rules allowing only necessary ports (TFTP 69, DHCP 67/68, PXE)
  • Implement network monitoring for suspicious traffic to/from WDS servers and block external access completely

🔍 How to Verify

Check if Vulnerable:

Check if WDS role is installed: Get-WindowsFeature -Name WDS. Check OS version: systeminfo | findstr /B /C:"OS Name" /C:"OS Version"

Check Version:

wmic product where "name like 'Windows Deployment Services%'" get version

Verify Fix Applied:

Verify July 2024 updates installed: Get-HotFix -Id KB5040442, KB5040434, or KB5040437. Check WDS service version.

📡 Detection & Monitoring

Log Indicators:

  • Event ID 4625 failed logons to WDS server
  • Unexpected WDS service crashes in System logs
  • Suspicious process creation from WDS executable (wdsserver.exe)

Network Indicators:

  • Unusual TFTP traffic patterns
  • Connection attempts to WDS from unauthorized IPs
  • Anomalous PXE boot requests outside maintenance windows

SIEM Query:

source="windows" event_id=4625 AND process_name="wdsserver.exe" | stats count by src_ip

🔗 References

📤 Share & Export