Vulnerability Description
RustDesk's Windows clipboard redirection copies a peer-supplied length into a fixed-size caller buffer without an upper bound check. When an OLE paste consumer such as explorer.exe calls IStream::Read with a buffer of cb bytes, CliprdrStream_Read in libs/clipboard/src/windows/wf_cliprdr.c requests that many bytes of a remote file through cliprdr_send_request_filecontents and then executes CopyMemory(pv, clipboard->req_fdata, clipboard->req_fsize), where req_fsize is taken verbatim from the peer's CLIPRDR FileContentsResponse by wf_cliprdr_server_file_contents_response (req_fsize = fileContentsResponse->cbRequested) and is never clamped to cb anywhere in the chain. The function's only length comparison, req_fsize < cb, handles the short-read case and is evaluated after the copy has already occurred. A malicious or compromised peer that answers a small file-contents read with an oversized response therefore writes attacker-chosen data past the end of the paste consumer's heap buffer when the local user pastes clipboard file contents offered by the remote side. The file is a fork of FreeRDP's client/Windows/wf_cliprdr.c, where the same defect is CVE-2026-68579, fixed in FreeRDP 3.30.0.
CVSS Score
CRITICAL
Related Weaknesses (CWE)
References
- https://github.com/FreeRDP/FreeRDP/security/advisories/GHSA-m37j-jcr2-8gcc
- https://github.com/rustdesk/rustdesk
- https://github.com/rustdesk/rustdesk/blob/1.4.9/libs/clipboard/src/windows/wf_cl
- https://github.com/rustdesk/rustdesk/pull/15515
- https://www.vulncheck.com/advisories/rustdesk-through-heap-buffer-overflow-via-u
FAQ
What is CVE-2026-76840?
CVE-2026-76840 is a vulnerability with a CVSS score of 9.6 (CRITICAL). RustDesk's Windows clipboard redirection copies a peer-supplied length into a fixed-size caller buffer without an upper bound check. When an OLE paste consumer such as explorer.exe calls IStream::Read...
How severe is CVE-2026-76840?
CVE-2026-76840 has been rated CRITICAL with a CVSS base score of 9.6/10. This is considered a critical vulnerability requiring immediate attention.
Is there a patch for CVE-2026-76840?
Check the references section above for vendor advisories and patch information. Review vendor security bulletins for remediation guidance.