CVE-2021-31535
JSON

9.8critical

LookupCol.c in X.Org X through X11R7.7 and libX11 before 1.7.1 might allow remote attackers to execute arbitrary code.

Severity
9.8critical CVSS:3.1 by NVD
Exploit likelihood
10.4% (higher than 95% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre

Description

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.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
x.org libx11before 1.7.1NVD
x.org x_window_systemup to x11r7.7NVD
fedoraproject fedora33NVD

All scores

NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD7.5high CVSS:2.0AV:N/AC:L/Au:N/C:P/I:P/A:P

Classification

What each source says

CVE List

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.

NVD (es)

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

References

https://unparalleled.eu/publications/2021/advisory-unpar-2021-1.txtexploit, third-party-advisory
https://lists.freedesktop.org/archives/xorg/third-party-advisory
http://www.openwall.com/lists/oss-security/2021/05/18/2mailing-list, third-party-advisory
http://seclists.org/fulldisclosure/2021/May/52mailing-list, third-party-advisory
http://packetstormsecurity.com/files/162737/libX11-Insufficient-Length-Check-Injection.htmlexploit, third-party-advisory, vdb-entry
https://lists.debian.org/debian-lts-announce/2021/05/msg00021.htmlmailing-list, third-party-advisory
https://www.debian.org/security/2021/dsa-4920third-party-advisory, vendor-advisory
https://security.gentoo.org/glsa/202105-16third-party-advisory, vendor-advisory
https://www.openwall.com/lists/oss-security/2021/05/18/3mailing-list, third-party-advisory
https://www.openwall.com/lists/oss-security/2021/05/18/2mailing-list, third-party-advisory
https://unparalleled.eu/blog/2021/20210518-using-xterm-to-navigate-the-huge-color-space/exploit, third-party-advisory
https://lists.x.org/archives/xorg-announce/2021-May/003088.htmlvendor-advisory

Sources

SourceRecordLicence
CVE ListCVE-2021-31535 changed 2024-08-03CVE Terms of Use
NVDCVE-2021-31535 changed 2026-06-17Public domain