# CVE-2020-4031: Use-After-Free in gdi\_SelectObject in FreeRDP

- Priority: **Routine**
- Reason: Not severe (CVSS 3.5, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2020-06-22 · Modified: 2024-08-04
- Aliases: UBUNTU-CVE-2020-4031, DEBIAN-CVE-2020-4031, ALPINE-CVE-2020-4031
- Record: https://cvemate.com/vulnerability/CVE-2020-4031 · JSON: https://cvemate.com/vulnerability/CVE-2020-4031/json

## Description

```text
In FreeRDP before version 2.1.2, there is a use-after-free in gdi_SelectObject. All FreeRDP clients using compatibility mode with /relax-order-checks are affected. This is fixed in version 2.1.2.
```

## Signals

- CVSS: 7.5 high (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- EPSS: 1.652%, percentile 77.378%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- alpine freerdp (Alpine Linux): \< 2.1.2-r0
- alpine freerdp2 (Alpine Linux): \< 2.1.2-r0
- canonical ubuntu\_linux: 18.04 \| 20.04
- debian freerdp2 (Debian): \< 2.1.2+dfsg1-1
- ubuntu freerdp2 (Ubuntu): \< 2.2.0+dfsg1-0ubuntu0.18.04.1 \| \< 2.2.0+dfsg1-0ubuntu0.20.04.1
- debian debian\_linux: 10.0
- fedoraproject fedora: 31 \| 32
- freerdp freerdp: \< 2.1.2
- opensuse leap: 15.1

## References

- <http://www.freerdp.com/2020/06/22/2_1_2-released>
- <https://github.com/FreeRDP/FreeRDP/security/advisories/GHSA-gwcq-hpq2-m74g>
- <https://github.com/FreeRDP/FreeRDP/commit/6d86e20e1e7caaab4f0c7f89e36d32914dbccc52>
- <http://lists.opensuse.org/opensuse-security-announce/2020-07/msg00080.html>
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6Y35HBHG2INICLSGCIKNAR7GCXEHQACQ/>
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XOZLH35OJWIQLM7FYDXAP2EAUBDXE76V/>
- <https://usn.ubuntu.com/4481-1/>
- <https://lists.debian.org/debian-lts-announce/2023/10/msg00008.html>
- <https://ubuntu.com/security/CVE-2020-4031>
- <https://ubuntu.com/security/notices/USN-4481-1>
- <https://www.cve.org/CVERecord?id=CVE-2020-4031>
- <https://security-tracker.debian.org/tracker/CVE-2020-4031>
- <https://security.alpinelinux.org/vuln/CVE-2020-4031>

---

Data as of 2026-12-05T06:50:48.237Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
