CVE-2021-31535
libX11: missing request length checks
Severity
ImportantRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · May 18, 2021
Updated · June 28, 2026
Description
A missing validation flaw was found in libX11. This flaw allows an attacker to inject X11 protocol commands on X clients, and in some cases, also bypass, authenticate (via injection of control characters), or potentially execute arbitrary code with permissions of the application compiled with libX11. The highest threat from this vulnerability is to confidentiality, integrity, as well as system availability.
Statement
This flaw was rated with an important severity as it allows an attacker to inject X11 protocol commands on X clients with the privileges of the application linked with the libX11 library, potentially having administrative privileges. However, Red Hat Enterprise Linux 8 and 9 do not run the Xorg server with root privileges, lowering the security impact of this issue. For this reason, Red Hat Enterprise Linux 8 and 9 have been rated with a moderate severity.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
xterm should not be used to display less trusted data, e.g. from SSH connections to less trusted remote machines. To avoid attacks via .Xdefaults on kiosk type machines, where graphical user has no permission to execute arbitrary operating system commands or sometimes not even to send hardware keyboard keystrokes, the .Xdefaults must not be modifiable by the user.
CVSS / CWE
CVSS 3.1 · 8.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 3.1 · 0CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:N
CWE-130 · Improper Handling of Length Parameter Inconsistency