CVE-2021-31535LookupCol.c in X.Org X through X11R7.7 and libX11 before 1.7.1 might allow remote attackers to execute arbitrary code. The libX11…
- 9.8CriticalCVSS base score
- 10.4%Exploitation in 30 daysEPSS · top 4.2% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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.
Timeline
ID reserved
By mitre
- 36 days later
· 36 days later
Published
- 3 years later
· 3 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| NVDNVD · Modified | 3.1 | Critical9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 10.4% · top 4.2% of all CVEs (18 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: Critical 9.8.
Affected products
n/a
- affected n/a
References
References19
- https://unparalleled.eu/publications/2021/advisory-unpar-2021-1.txt (opens in a new tab)x_refsource_MISCx_transferred
- https://lists.freedesktop.org/archives/xorg/ (opens in a new tab)x_refsource_MISCx_transferred
- [oss-security] 20210518 libX11 security advisory: May 18, 2021 (opens in a new tab)mailing-listx_refsource_MLISTx_transferred
- 20210520 CVE-2021-31535 libX11 Insufficient Length Checks PoC and Archeology (opens in a new tab)mailing-listx_refsource_FULLDISCx_transferred
- http://packetstormsecurity.com/files/162737/libX11-Insufficient-Length-Check-Injection.html (opens in a new tab)x_refsource_MISCx_transferred
- [debian-lts-announce] 20210524 [SECURITY] [DLA 2666-1] libx11 security update (opens in a new tab)mailing-listx_refsource_MLISTx_transferred
- DSA-4920 (opens in a new tab)vendor-advisoryx_refsource_DEBIANx_transferred
- GLSA-202105-16 (opens in a new tab)vendor-advisoryx_refsource_GENTOOx_transferred
- https://www.openwall.com/lists/oss-security/2021/05/18/3 (opens in a new tab)x_refsource_MISCx_transferred
- https://www.openwall.com/lists/oss-security/2021/05/18/2 (opens in a new tab)x_refsource_MISCx_transferred
- https://unparalleled.eu/blog/2021/20210518-using-xterm-to-navigate-the-huge-color-space/ (opens in a new tab)x_refsource_MISCx_transferred
- https://lists.x.org/archives/xorg-announce/2021-May/003088.html (opens in a new tab)x_refsource_MISCx_transferred
- https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/8d2e02ae650f00c4a53deb625211a0527126c605 (opens in a new tab)x_refsource_MISCx_transferred
- https://security.netapp.com/advisory/ntap-20210813-0001/ (opens in a new tab)x_refsource_CONFIRMx_transferred
- FEDORA-2021-62bb9998b2 (opens in a new tab)vendor-advisoryx_refsource_FEDORAx_transferred
- [kafka-dev] 20210831 Security vulnerabilities in kafka:2.13-2.6.0/2.7.0 docker image (opens in a new tab)mailing-listx_refsource_MLISTx_transferred
- [kafka-users] 20210831 Security vulnerabilities in kafka:2.13-2.6.0/2.7.0 docker image (opens in a new tab)mailing-listx_refsource_MLISTx_transferred
- [kafka-users] 20210901 Re: [EXTERNAL] Re: Security vulnerabilities in kafka:2.13-2.6.0/2.7.0 docker image (opens in a new tab)mailing-listx_refsource_MLISTx_transferred
- [kafka-dev] 20210901 Re: [EXTERNAL] Re: Security vulnerabilities in kafka:2.13-2.6.0/2.7.0 docker image (opens in a new tab)mailing-listx_refsource_MLISTx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2021-18433 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2021-31535)Record last updated .