CVE-2021-41160
Improper region checks in FreeRDP allow out of bound write to memory
Check your servers for CVE-2021-41160
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2021-41160 affects freerdp, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
FreeRDP is a free implementation of the Remote Desktop Protocol (RDP), released under the Apache license. In affected versions a malicious server might trigger out of bound writes in a connected client. Connections using GDI or SurfaceCommands to send graphics updates to the client might send `0` width/height or out of bound rectangles to trigger out of bound writes. With `0` width or heigth the memory allocation will be `0` but the missing bounds checks allow writing to the pointer at this (not allocated) region. This issue has been patched in FreeRDP 2.4.1.
Severity (CVSS)
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:N/I:H/A:N
- Attack vector
- local: the attacker needs local access, or a user has to open a prepared file
- Attack complexity
- high: an attack depends on conditions outside the control of the attacker, such as a race
- Privileges required
- high: the attacker needs an administrative account
- User interaction
- none: nobody has to click or open anything
- Scope
- changed: the damage reaches other components, such as the host of a container or other users
- Impact
- confidentiality none, integrity high, availability none: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 1.66%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 77.4% of all scored CVEs. Scores of 2 Dec 2026.
Weakness
- CWE-787 Out-of-bounds Write
Affected products
As the CNA lists them.
Is my server affected?
Find the installed version of freerdp and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i freerdp
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2021-41160 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2021-41160RHEL, Rocky, Alma, Fedora
rpm -q freerdp
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2021-41160Alpine
apk list --installed | grep -i freerdpWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2021-41160
trivy image --scanners vuln IMAGE | grep CVE-2021-41160
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- FEDORA-2021-2c25f03d0b lists.fedoraproject.org · vendor advisory
- FEDORA-2021-5d227916bc lists.fedoraproject.org · vendor advisory
- FEDORA-2021-ac23d9e47f lists.fedoraproject.org · vendor advisory
- GLSA-202210-24 security.gentoo.org · vendor advisory
Other references
- https://github.com/FreeRDP/FreeRDP/security/advisories/GHSA-7c9r-6r2q-93qg github.com
- [debian-lts-announce] 20231117 [SECURITY] [DLA 3654-1] freerdp2 security update lists.debian.org · mailing list
- https://lists.debian.org/debian-lts-announce/2025/02/msg00016.html lists.debian.org
Source: the record CVE-2021-41160 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse