Integer Overflow and Heap-Based Buffer Overflow in LibVNCServer (CVE-2019-20788)

libvncserver Updated 02 Oct 2025

Summary

23/04/2020
N/A
Yes i
Critical
9.8

CVE-2019-20788: libvncclient/cursor.c in LibVNCServer through 0.9.12 has a HandleCursorShape integer overflow and heap-based buffer overflow via a large height or width value. Affects libvncserver across 2 version ranges.

< 0.9.12+dfsg-9 < 54220248886b5001fbbb9fa73c4e1a2cb9413fed

Fixed in 0.9.12+dfsg-9. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

LibVNCServer is an open-source implementation of the Virtual Network Computing (VNC) protocol, allowing remote access to graphical user interfaces. It is widely used in various applications for remote desktop sharing and control. The package is designed to be lightweight and efficient, making it suitable for both server and client implementations. However, it has been found to be vulnerable to an integer overflow and heap-based buffer overflow, which can lead to severe security issues.

Vulnerability Detail

The vulnerability identified as CVE-2019-20788 arises from an integer overflow in the HandleCursorShape function located in the cursor.c file of LibVNCServer versions up to 0.9.12. This overflow can occur when large height or width values are processed, potentially leading to a heap-based buffer overflow. Attackers can exploit this vulnerability to execute arbitrary code, resulting in a complete compromise of the affected system. The severity of this vulnerability is underscored by its CVSS score of 9.8, indicating a critical risk to systems utilizing the affected versions of the package.

How To Fix

Minimum fixed version

0.9.12+dfsg-9

This is the first release that contains the fix.

sudo apt-get install --only-upgrade libvncserver

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary measure, users can restrict access to the VNC server to trusted IP addresses only, thereby minimizing the risk of exploitation until the package is updated. Additionally, disabling the VNC service when not in use can help mitigate potential attacks.

Conclusion

CVE-2019-20788 represents a significant security risk for users of LibVNCServer versions prior to 0.9.12. It is crucial for users to update their installations promptly to mitigate the risk of exploitation. Additionally, utilizing tools like Vulert can help in monitoring for vulnerabilities in open-source software effectively.

See every vulnerability recorded for libvncserver →

Share this vulnerability

FAQ

CVE-2019-20788 is a vulnerability in LibVNCServer that allows for an integer overflow and heap-based buffer overflow, potentially leading to arbitrary code execution.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. By uploading your manifest file like package-lock.json, you can check for vulnerabilities without requiring code access.

Exploitation of this vulnerability can lead to arbitrary code execution, allowing attackers to take control of the affected system, steal data, or disrupt services.

Yes, you can restrict access to the VNC server and disable it when not in use to reduce the risk of exploitation until an update is applied.

The CVSS score of CVE-2019-20788 is 9.8, indicating a critical level of risk associated with this vulnerability.

Related vulnerabilities

Recent vulnerabilities recorded for libvncserver.

How To Fix

Minimum fixed version

0.9.12+dfsg-9

This is the first release that contains the fix.

sudo apt-get install --only-upgrade libvncserver

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback