CVE-2020-13398
📋 TL;DR
CVE-2020-13398 is an out-of-bounds write vulnerability in FreeRDP's RSA crypto implementation that allows attackers to write data beyond allocated memory boundaries. This affects FreeRDP clients and servers before version 2.1.1, potentially leading to remote code execution or denial of service.
💻 Affected Systems
- FreeRDP
- Applications using libfreerdp
📦 What is this software?
Freerdp by Freerdp
Leap by Opensuse
Ubuntu Linux by Canonical
Ubuntu Linux by Canonical
Ubuntu Linux by Canonical
Ubuntu Linux by Canonical
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution with the same privileges as the FreeRDP process, potentially leading to complete system compromise.
Likely Case
Application crash (denial of service) or memory corruption leading to unstable behavior.
If Mitigated
Limited impact if proper network segmentation and least privilege principles are followed.
🎯 Exploit Status
Exploitation requires network access to FreeRDP service and knowledge of vulnerable crypto operations.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 2.1.1 and later
Vendor Advisory: https://github.com/FreeRDP/FreeRDP/security/advisories
Restart Required: Yes
Instructions:
1. Update FreeRDP to version 2.1.1 or later using your package manager. 2. For Linux: 'sudo apt update && sudo apt upgrade freerdp2' (Debian/Ubuntu) or 'sudo yum update freerdp' (RHEL/CentOS). 3. For Windows: Download latest installer from FreeRDP GitHub releases. 4. Restart affected services or systems.
🔧 Temporary Workarounds
Network Segmentation
linuxRestrict FreeRDP access to trusted networks only
iptables -A INPUT -p tcp --dport 3389 -s trusted_network -j ACCEPT
iptables -A INPUT -p tcp --dport 3389 -j DROP
Disable Vulnerable Feature
allAvoid using RSA crypto operations in FreeRDP if possible
Configure FreeRDP to use alternative authentication methods
🧯 If You Can't Patch
- Implement strict network access controls to limit FreeRDP exposure
- Monitor for abnormal FreeRDP process behavior and memory usage patterns
🔍 How to Verify
Check if Vulnerable:
Check FreeRDP version: 'xfreerdp --version' or 'freerdp --version'. If version is below 2.1.1, system is vulnerable.
Check Version:
xfreerdp --version 2>/dev/null || freerdp --version 2>/dev/null || dpkg -l | grep freerdp || rpm -qa | grep freerdp
Verify Fix Applied:
After update, verify version is 2.1.1 or higher: 'xfreerdp --version | grep -E "2\\.1\\.1|2\\.1\\.2|2\\.2"'
📡 Detection & Monitoring
Log Indicators:
- FreeRDP process crashes
- Abnormal memory access errors in system logs
- Segmentation faults in FreeRDP
Network Indicators:
- Unusual RDP connection patterns
- Multiple failed RSA handshake attempts
SIEM Query:
process_name:"xfreerdp" OR process_name:"freerdp" AND (event_type:crash OR memory_violation)
🔗 References
- http://lists.opensuse.org/opensuse-security-announce/2020-07/msg00080.html
- https://github.com/FreeRDP/FreeRDP/commit/8305349a943c68b1bc8c158f431dc607655aadea
- https://github.com/FreeRDP/FreeRDP/commit/8fb6336a4072abcee8ce5bd6ae91104628c7bb69
- https://github.com/FreeRDP/FreeRDP/compare/2.1.0...2.1.1
- https://lists.debian.org/debian-lts-announce/2020/08/msg00054.html
- https://lists.debian.org/debian-lts-announce/2023/10/msg00008.html
- https://usn.ubuntu.com/4379-1/
- https://usn.ubuntu.com/4382-1/
- http://lists.opensuse.org/opensuse-security-announce/2020-07/msg00080.html
- https://github.com/FreeRDP/FreeRDP/commit/8305349a943c68b1bc8c158f431dc607655aadea
- https://github.com/FreeRDP/FreeRDP/commit/8fb6336a4072abcee8ce5bd6ae91104628c7bb69
- https://github.com/FreeRDP/FreeRDP/compare/2.1.0...2.1.1
- https://lists.debian.org/debian-lts-announce/2020/08/msg00054.html
- https://lists.debian.org/debian-lts-announce/2023/10/msg00008.html
- https://usn.ubuntu.com/4379-1/
- https://usn.ubuntu.com/4382-1/