CVE-2021-31535: Input Validation
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.
Other sources
LookupCol.c in X.Org X through X11R7.7 and libX11 before 1.7.1 might allow remote attackers to execute arbitrary code. The libX11 XLookupColor request (intended for server-side color lookup) contains a flaw allowing a client to send color-name requests with a name longer than the maximum size allowed by the protocol (and also longer than the maximum packet size for normal-sized packets). The user-controlled data exceeding the maximum size is then interpreted by the server as additional X protocol requests and executed, e.g., to disable X server authorization completely. For example, if the victim encounters malicious terminal control sequences for color codes, then the attacker may be able to take full control of the running graphical session.
XLookupColor() and other X libraries function lack proper validation of the length of their string parameters. If those parameters can be controlled by an external application (for instance a color name that can be emitted via a terminal control sequence) it can lead to the emission of extra X protocol requests to the X server.
References: https://www.openwall.com/lists/oss-security/2021/05/18/2 https://www.openwall.com/lists/oss-security/2021/05/18/3
— Red Hat
Affected Software
Remediation
Information
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is CVE-2021-31535?
CVE-2021-31535 is a vulnerability in libX11 that allows remote attackers to execute arbitrary code.
How severe is CVE-2021-31535?
CVE-2021-31535 has a severity rating of 9.8 (critical).
What software is affected by CVE-2021-31535?
The libX11 package with versions before 1.7.1 on Red Hat, libX11 package with various versions on Debian, X.Org libX11 with versions before 1.7.1, X.org X Window System up to inclusive x11r7.7, and Fedoraproject Fedora 33 are affected.
How can I fix CVE-2021-31535?
To fix CVE-2021-31535, update libX11 to version 1.7.1 on Red Hat, update libX11 to the recommended versions on Debian, and update X.Org libX11 to version 1.7.1.
Where can I find more information about CVE-2021-31535?
More information about CVE-2021-31535 can be found at the following references: [Reference 1], [Reference 2], [Reference 3]