{"id":"CVE-2021-31535","aliases":["CVE-2021-31535"],"related":[],"kind":"vulnerability","state":"published","title":"LookupCol.c in X.Org X through X11R7.7 and libX11 before 1.7.1 might allow remote attackers to execute arbitrary code.","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"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.&#xa0;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).&#xa0;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.&#xa0;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","source":"nvd"}],"published":"2021-05-27T12:26:26.000Z","modified":"2026-06-17T03:51:58.060Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","score":7.5,"rating":"HIGH"}],"cwes":["CWE-120"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"status":"affected","fixed":"1.7.1"}],"vendor":"x.org","product":"libx11","cpe":"cpe:2.3:a:x.org:libx11:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","lastAffected":"x11r7.7"}],"vendor":"x.org","product":"x_window_system","cpe":"cpe:2.3:o:x.org:x_window_system:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"33"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://unparalleled.eu/publications/2021/advisory-unpar-2021-1.txt","tags":["exploit","third-party-advisory","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.freedesktop.org/archives/xorg/","tags":["third-party-advisory","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd"]},{"url":"http://www.openwall.com/lists/oss-security/2021/05/18/2","tags":["mailing-list","third-party-advisory","x-refsource-mlist","x-transferred"],"sources":["cvelist","nvd"]},{"url":"http://seclists.org/fulldisclosure/2021/May/52","tags":["mailing-list","third-party-advisory","x-refsource-fulldisc","x-transferred"],"sources":["cvelist","nvd"]},{"url":"http://packetstormsecurity.com/files/162737/libX11-Insufficient-Length-Check-Injection.html","tags":["exploit","third-party-advisory","vdb-entry","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2021/05/msg00021.html","tags":["mailing-list","third-party-advisory","x-refsource-mlist","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://www.debian.org/security/2021/dsa-4920","tags":["third-party-advisory","vendor-advisory","x-refsource-debian","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://security.gentoo.org/glsa/202105-16","tags":["third-party-advisory","vendor-advisory","x-refsource-gentoo","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://www.openwall.com/lists/oss-security/2021/05/18/3","tags":["mailing-list","third-party-advisory","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://www.openwall.com/lists/oss-security/2021/05/18/2","tags":["mailing-list","third-party-advisory","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://unparalleled.eu/blog/2021/20210518-using-xterm-to-navigate-the-huge-color-space/","tags":["exploit","third-party-advisory","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.x.org/archives/xorg-announce/2021-May/003088.html","tags":["vendor-advisory","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/8d2e02ae650f00c4a53deb625211a0527126c605","tags":["third-party-advisory","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://security.netapp.com/advisory/ntap-20210813-0001/","tags":["third-party-advisory","x-refsource-confirm","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TEOT4RLB76RVPJQKGGTIKTBIOLHX2NR6/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.apache.org/thread.html/r61db8e7dcb56dc000a5387a88f7a473bacec5ee01b9ff3f55308aacc%40%3Cdev.kafka.apache.org%3E","tags":["mailing-list","x-refsource-mlist","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.apache.org/thread.html/r61db8e7dcb56dc000a5387a88f7a473bacec5ee01b9ff3f55308aacc%40%3Cusers.kafka.apache.org%3E","tags":["mailing-list","x-refsource-mlist","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.apache.org/thread.html/rbf4ce74b0d1fa9810dec50ba3ace0caeea677af7c27a97111c06ccb7%40%3Cusers.kafka.apache.org%3E","tags":["mailing-list","x-refsource-mlist","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.apache.org/thread.html/rbf4ce74b0d1fa9810dec50ba3ace0caeea677af7c27a97111c06ccb7%40%3Cdev.kafka.apache.org%3E","tags":["mailing-list","x-refsource-mlist","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-31535","url":"https://www.cve.org/CVERecord?id=CVE-2021-31535","licence":"CVE Terms of Use","modified":"2024-08-03T23:03:33.270Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-31535","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-31535","licence":"Public domain","modified":"2026-06-17T03:51:58.060Z"}],"updatedAt":"2026-11-25T22:58:01.570Z","epss":{"score":0.10437,"percentile":0.95847,"date":"2026-12-01T12:00:22.000Z"}}