CVE-2019-20788
📋 TL;DR
This vulnerability in LibVNCServer allows remote attackers to execute arbitrary code or cause denial of service via integer overflow and heap-based buffer overflow when processing specially crafted cursor shape data. It affects all applications using vulnerable versions of LibVNCServer for VNC client functionality. Attackers can exploit this without authentication to potentially gain full control of affected systems.
💻 Affected Systems
- LibVNCServer
- Any software using LibVNCServer library
📦 What is this software?
Libvncserver by Libvnc Project
Ubuntu Linux by Canonical
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 leading to complete system compromise, data theft, and lateral movement within the network.
Likely Case
Denial of service through application crashes, with potential for remote code execution in vulnerable configurations.
If Mitigated
Application crash without code execution if exploit fails or mitigations are in place.
🎯 Exploit Status
Exploitation requires network access to the vulnerable service. The vulnerability is in cursor handling code that processes untrusted input from VNC servers.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Versions after commit 54220248886b5001fbbb9fa73c4e1a2cb9413fed
Vendor Advisory: https://github.com/LibVNC/libvncserver/commit/54220248886b5001fbbb9fa73c4e1a2cb9413fed
Restart Required: Yes
Instructions:
1. Update LibVNCServer to version 0.9.13 or later. 2. Recompile any applications using the library. 3. Restart affected services.
🔧 Temporary Workarounds
Network segmentation
allRestrict network access to VNC services to trusted sources only
Disable vulnerable functionality
allDisable cursor shape support if not required
🧯 If You Can't Patch
- Implement strict network access controls to limit exposure
- Monitor for abnormal process crashes or memory usage patterns
🔍 How to Verify
Check if Vulnerable:
Check LibVNCServer version: ldd --version | grep -i vnc or check package manager for libvncserver version
Check Version:
dpkg -l | grep libvncserver OR rpm -qa | grep libvncserver OR vncconfig --version
Verify Fix Applied:
Verify version is 0.9.13 or later, or check for commit 54220248886b5001fbbb9fa73c4e1a2cb9413fed in source
📡 Detection & Monitoring
Log Indicators:
- Application crashes with segmentation faults
- Abnormal memory usage patterns
- Connection attempts from unexpected sources
Network Indicators:
- VNC protocol traffic with large cursor dimensions
- Unusual VNC connection patterns
SIEM Query:
process:crash AND (process_name:libvnc OR process_name:vnc) OR network:protocol:vnc AND network:payload_size:large
🔗 References
- http://lists.opensuse.org/opensuse-security-announce/2020-05/msg00027.html
- https://cert-portal.siemens.com/productcert/pdf/ssa-390195.pdf
- https://github.com/LibVNC/libvncserver/commit/54220248886b5001fbbb9fa73c4e1a2cb9413fed
- https://securitylab.github.com/advisories/GHSL-2020-064-libvnc-libvncclient
- https://usn.ubuntu.com/4407-1/
- http://lists.opensuse.org/opensuse-security-announce/2020-05/msg00027.html
- https://cert-portal.siemens.com/productcert/pdf/ssa-390195.pdf
- https://github.com/LibVNC/libvncserver/commit/54220248886b5001fbbb9fa73c4e1a2cb9413fed
- https://securitylab.github.com/advisories/GHSL-2020-064-libvnc-libvncclient
- https://usn.ubuntu.com/4407-1/