CVE-2023-39355

7.0 HIGH

📋 TL;DR

This CVE describes a use-after-free vulnerability in FreeRDP's processing of RDPGFX_CMDID_RESETGRAPHICS packets. When context->maxPlaneSize is 0, the planesBuffer is freed but the pointer isn't updated, creating an exploit vector. This affects FreeRDP 3.x beta releases before beta3 and could lead to crashes or potential remote code execution.

💻 Affected Systems

Products:
  • FreeRDP
Versions: FreeRDP 3.x releases before version 3.0.0-beta3
Operating Systems: Linux, Windows, macOS, BSD
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects the 3.x beta branch. Stable 2.x releases are not affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to full system compromise of the FreeRDP client or server.

🟠

Likely Case

Application crash (denial of service) when processing malicious RDP packets.

🟢

If Mitigated

No impact if patched or if exploit attempts are blocked by network controls.

🌐 Internet-Facing: MEDIUM - FreeRDP servers exposed to internet could be targeted, but exploitation requires specific conditions.
🏢 Internal Only: LOW - Internal RDP connections are typically trusted, reducing attack surface.

🎯 Exploit Status

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

Exploitation requires sending specially crafted RDPGFX packets to trigger the use-after-free condition.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 3.0.0-beta3 and later

Vendor Advisory: https://github.com/FreeRDP/FreeRDP/security/advisories/GHSA-hvwj-vmg6-2f5h

Restart Required: Yes

Instructions:

1. Check current FreeRDP version: freerdp --version
2. If version is < 3.0.0-beta3, upgrade using package manager or compile from source
3. For Debian/Ubuntu: apt update && apt upgrade freerdp2
4. For RHEL/CentOS: yum update freerdp
5. Restart any FreeRDP services or applications

🔧 Temporary Workarounds

No known workarounds

all

The vendor advisory states there are no known workarounds for this vulnerability.

🧯 If You Can't Patch

  • Restrict network access to FreeRDP services using firewalls to only trusted sources.
  • Monitor for crash logs and unusual RDP connection attempts as indicators of exploitation.

🔍 How to Verify

Check if Vulnerable:

Run: freerdp --version | grep -E '^3\.' && echo "Check if version is < 3.0.0-beta3"

Check Version:

freerdp --version

Verify Fix Applied:

Confirm version is 3.0.0-beta3 or higher: freerdp --version

📡 Detection & Monitoring

Log Indicators:

  • FreeRDP crash logs
  • Segmentation fault errors in system logs
  • Unexpected termination of FreeRDP processes

Network Indicators:

  • Unusual RDPGFX packet patterns
  • Multiple RDP connection attempts from single source

SIEM Query:

source="*freerdp*" AND ("segmentation fault" OR "crash" OR "SIGSEGV")

🔗 References

📤 Share & Export