// For flags

CVE-2021-31535

libX11: missing request length checks

Severity Score

9.8
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

3
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

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.

El archivo LookupCol.c en X.Org X versiones hasta X11R7.7 y libX11 versiones anteriores a 1.7.1, podría permitir que atacantes remotos ejecuten código arbitrario. La peticiones XLookupColor de libX11 (destinada a la búsqueda de color del lado del servidor) contiene un fallo que permite a un cliente enviar peticiones de nombre de color con un nombre más largo que el tamaño máximo permitido por el protocolo (y también más largo que el tamaño máximo de paquete para tamaño normal de paquetes). Los datos controlados por el usuario que exceden el tamaño máximo son luego interpretados por el servidor como peticiones de protocolo X adicionales y ejecutados, por ejemplo, para deshabilitar completamente la autorización del servidor X. Por ejemplo, si la víctima encuentra secuencias de control de terminal maliciosas para códigos de color, entonces el atacante puede tomar el control total de la sesión gráfica en ejecución

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.

A missing length check in libX11 allows data from LookupColor requests to mess up the client-server communication protocol and inject malicious X server requests.

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
Attack Vector
Network
Attack Complexity
Low
Authentication
None
Confidentiality
Partial
Integrity
Partial
Availability
Partial
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2021-04-21 CVE Reserved
  • 2021-05-21 CVE Published
  • 2024-08-03 CVE Updated
  • 2024-08-03 First Exploit
  • 2024-09-12 EPSS Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
CWE
  • CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')
  • CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')
CAPEC
References (21)
URL Date SRC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
X.org
Search vendor "X.org"
Libx11
Search vendor "X.org" for product "Libx11"
< 1.7.1
Search vendor "X.org" for product "Libx11" and version " < 1.7.1"
-
Affected
X.org
Search vendor "X.org"
X Window System
Search vendor "X.org" for product "X Window System"
<= x11r7.7
Search vendor "X.org" for product "X Window System" and version " <= x11r7.7"
-
Affected
Fedoraproject
Search vendor "Fedoraproject"
Fedora
Search vendor "Fedoraproject" for product "Fedora"
33
Search vendor "Fedoraproject" for product "Fedora" and version "33"
-
Affected