# CVE-2021-31535

- Priority: **Prioritise**
- Reason: Public exploit (reference, Date unknown)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2021-05-27 · Modified: 2024-08-03
- Aliases: ALPINE-CVE-2021-31535, MGASA-2021-0219, SUSE-SU-2021:14748-1, SUSE-SU-2021:1765-1, SUSE-SU-2021:1766-1, SUSE-SU-2021:1892-1, SUSE-SU-2021:1897-1, RHSA-2021:3296, RHSA-2021:4326, UBUNTU-CVE-2021-31535, USN-4966-1, USN-4966-2, DEBIAN-CVE-2021-31535, DLA-2666-1, DSA-4920-1, openSUSE-SU-2021:0807-1, openSUSE-SU-2021:0857-1, openSUSE-SU-2021:1897-1
- Record: https://cvemate.com/vulnerability/CVE-2021-31535 · JSON: https://cvemate.com/vulnerability/CVE-2021-31535/json

## Description

```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.
```

## Signals

- CVSS: 9.8 critical (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS: 10.437%, percentile 95.87%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 3 (reference)

## Affected (first 20 of 49)

- alpine libx11 (Alpine Linux): \< 1.6.12-r1 \| \< 1.7.1-r0
- debian libx11 (Debian): \< 2:1.7.1-1 \| \< 2:1.6.4-3+deb9u4 \| \< 2:1.6.7-1+deb10u2
- ubuntu libx11 (Ubuntu): \< 2:1.6.2-1ubuntu2.1+esm2 \| \< 2:1.6.3-1ubuntu2.2+esm1 \| \< 2:1.6.4-3ubuntu0.4 \| \< 2:1.6.9-2ubuntu1.2
- fedoraproject fedora: 33
- mageia libx11 (Mageia): \< 1.6.12-1.1.mga7
- mageia libx11 (Mageia): \< 1.7.0-1.1.mga8
- opensuse libX11&distro=openSUSE Leap 15.2 (openSUSE): \< 1.6.5-lp152.5.15.1 \| \< 1.6.5-lp152.5.18.1
- opensuse libX11&distro=openSUSE Leap 15.3 (openSUSE): \< 1.6.5-3.21.1
- redhat libX11 (Red Hat): \< 0:1.6.7-4.el7\_9 \| \< 0:1.6.8-5.el8
- redhat libX11-common (Red Hat): \< 0:1.6.7-4.el7\_9 \| \< 0:1.6.8-5.el8
- redhat libX11-debuginfo (Red Hat): \< 0:1.6.7-4.el7\_9 \| \< 0:1.6.8-5.el8
- redhat libX11-debugsource (Red Hat): \< 0:1.6.8-5.el8
- redhat libX11-devel (Red Hat): \< 0:1.6.7-4.el7\_9 \| \< 0:1.6.8-5.el8
- redhat libX11-xcb (Red Hat): \< 0:1.6.8-5.el8
- redhat libX11-xcb-debuginfo (Red Hat): \< 0:1.6.8-5.el8
- suse libX11&distro=HPE Helion OpenStack 8 (SUSE Linux Enterprise): \< 1.6.2-12.21.1
- suse libX11&distro=SUSE Enterprise Storage 6 (SUSE Linux Enterprise): \< 1.6.5-3.21.1
- suse libX11&distro=SUSE Linux Enterprise High Performance Computing 15 SP1-ESPOS (SUSE Linux Enterprise): \< 1.6.5-3.21.1
- suse libX11&distro=SUSE Linux Enterprise High Performance Computing 15 SP1-LTSS (SUSE Linux Enterprise): \< 1.6.5-3.21.1
- suse libX11&distro=SUSE Linux Enterprise High Performance Computing 15-ESPOS (SUSE Linux Enterprise): \< 1.6.5-3.21.1

## References (first 20 of 49)

- <https://unparalleled.eu/publications/2021/advisory-unpar-2021-1.txt>
- <https://lists.freedesktop.org/archives/xorg/>
- <http://www.openwall.com/lists/oss-security/2021/05/18/2>
- <http://seclists.org/fulldisclosure/2021/May/52>
- <http://packetstormsecurity.com/files/162737/libX11-Insufficient-Length-Check-Injection.html>
- <https://lists.debian.org/debian-lts-announce/2021/05/msg00021.html>
- <https://www.debian.org/security/2021/dsa-4920>
- <https://security.gentoo.org/glsa/202105-16>
- <https://www.openwall.com/lists/oss-security/2021/05/18/3>
- <https://www.openwall.com/lists/oss-security/2021/05/18/2>
- <https://unparalleled.eu/blog/2021/20210518-using-xterm-to-navigate-the-huge-color-space/>
- <https://lists.x.org/archives/xorg-announce/2021-May/003088.html>
- <https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/8d2e02ae650f00c4a53deb625211a0527126c605>
- <https://security.netapp.com/advisory/ntap-20210813-0001/>
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TEOT4RLB76RVPJQKGGTIKTBIOLHX2NR6/>
- <https://lists.apache.org/thread.html/r61db8e7dcb56dc000a5387a88f7a473bacec5ee01b9ff3f55308aacc%40%3Cdev.kafka.apache.org%3E>
- <https://lists.apache.org/thread.html/r61db8e7dcb56dc000a5387a88f7a473bacec5ee01b9ff3f55308aacc%40%3Cusers.kafka.apache.org%3E>
- <https://lists.apache.org/thread.html/rbf4ce74b0d1fa9810dec50ba3ace0caeea677af7c27a97111c06ccb7%40%3Cusers.kafka.apache.org%3E>
- <https://lists.apache.org/thread.html/rbf4ce74b0d1fa9810dec50ba3ace0caeea677af7c27a97111c06ccb7%40%3Cdev.kafka.apache.org%3E>
- <https://security.alpinelinux.org/vuln/CVE-2021-31535>

---

Data as of 2026-12-05T06:22:38.918Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
