Security Vulnerability Report
中文
CVE-2026-33987 CVSS 7.1 HIGH

CVE-2026-33987

Published: 2026-03-30 22:16:20
Last Modified: 2026-04-01 18:44:44

Description

FreeRDP is a free implementation of the Remote Desktop Protocol. Prior to version 3.24.2, in persistent_cache_read_entry_v3() in libfreerdp/cache/persistent.c, persistent->bmpSize is updated before winpr_aligned_recalloc(). If realloc fails, bmpSize is inflated while bmpData points to the old buffer. This issue has been patched in version 3.24.2.

CVSS Details

CVSS Score
7.1
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/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 Concept for CVE-2026-33987 * Demonstrates the logic flaw in persistent_cache_read_entry_v3 */ #include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct { size_t bmpSize; char* bmpData; } PersistentCache; // Simulated vulnerable function void vulnerable_realloc(PersistentCache* cache, size_t new_size) { printf("[VULN] Updating bmpSize to %zu before allocation...\n", new_size); // FLAW: Update size first cache->bmpSize = new_size; printf("[VULN] Attempting realloc (simulating failure)...\n"); // Simulate allocation failure by returning NULL char* new_data = (char*)realloc(cache->bmpData, new_size); if (!new_data) { printf("[VULN] Realloc failed!\n"); printf("[VULN] State Inconsistency: bmpSize=%zu, but bmpData is old pointer (smaller buffer).\n", cache->bmpSize); return; } cache->bmpData = new_data; } int main() { PersistentCache cache; cache.bmpSize = 10; cache.bmpData = (char*)malloc(10); strcpy(cache.bmpData, "old_data"); // Trigger the vulnerability with a large size request causing failure vulnerable_realloc(&cache, 999999999999999); // Demonstrate unsafe access based on inconsistent state if (cache.bmpSize > 10) { printf("[EXPLOIT] Writing %zu bytes to old buffer (size 10)...\n", cache.bmpSize); // This would cause heap corruption/crash // memset(cache.bmpData, 'A', cache.bmpSize); } free(cache.bmpData); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-33987", "sourceIdentifier": "[email protected]", "published": "2026-03-30T22:16:20.017", "lastModified": "2026-04-01T18:44:43.633", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "FreeRDP is a free implementation of the Remote Desktop Protocol. Prior to version 3.24.2, in persistent_cache_read_entry_v3() in libfreerdp/cache/persistent.c, persistent->bmpSize is updated before winpr_aligned_recalloc(). If realloc fails, bmpSize is inflated while bmpData points to the old buffer. 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 persistent_cache_read_entry_v3() en libfreerdp/cache/persistent.c, persistent-&gt;bmpSize se actualiza antes de winpr_aligned_recalloc(). Si realloc falla, bmpSize se infla mientras bmpData apunta al búfer antiguo. 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:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H", "baseScore": 7.1, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.2}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H", "baseScore": 6.6, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.3, "impactScore": 5.2}]}, "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/1a890eb43492b5eb707cb3dd6fc908f696e8fc1c", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/FreeRDP/FreeRDP/security/advisories/GHSA-ff8h-p5vc-wcwc", "source": "[email protected]", "tags": ["Patch", "Vendor Advisory"]}]}}