CVE-2021-31535
No exploitation reported by the sources we read.
- Published2021-05-27
- WeaknessCWE-120
Am I affected?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « affected ».With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.
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
dates in UTC- 2021-05-2713:15CVE publishedNVD
Versions per branch
NVD| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 33.x | = 33 | no fix published | NVD |
| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 1.7 | < 1.7.1 | 1.7.1 | NVD |
| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| — | ≤ x11r7.7 | no fix published | NVD |
as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.
Distribution builds and vendor advisories
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Packages
- libx11Ubuntu:Pro:16.04:LTSall versions · fixed in 2:1.6.3-1ubuntu2.2+esm1
- libx11Ubuntu:Pro:14.04:LTSall versions · fixed in 2:1.6.2-1ubuntu2.1+esm2
- libx11Ubuntu:20.04:LTSall versions · fixed in 2:1.6.9-2ubuntu1.2
- libx11Ubuntu:18.04:LTSall versions · fixed in 2:1.6.4-3ubuntu0.4
- libx11Mageia:8all versions · fixed in 1.7.0-1.1.mga8
- libx11Mageia:7all versions · fixed in 1.6.12-1.1.mga7
- libx11Debian:14all versions · fixed in 2:1.7.1-1
- libx11Debian:13all versions · fixed in 2:1.7.1-1
73 more package ranges on OSV.dev
Vendor advisories
libX11: missing request length checks
libX11 as a component of Red Hat Enterprise Linux 6 · libX11-common as a component of Red Hat Enterprise Linux 6 · libX11-devel as a component of Red Hat Enterprise Linux 6 · +1 more
Red Hat Security Advisory: libX11 security update
Red Hat Security Advisory: RHV-H security update (redhat-virtualization-host) 4.3.18
Red Hat Bug Fix Advisory: Red Hat Ansible Tower 3.8.4-1 - Container
Red Hat Security Advisory: libX11 security update
Fix
- Vendor fix Red Hat Product Security RHSA-2021:4326 · 32 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
- Vendor fix Red Hat Product Security RHSA-2021:3477 · 4 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/2974891
- Vendor fix Red Hat Product Security RHBA-2021:3472 · 1 productBefore applying this update, make sure all previously released errata relevant to your system have been applied. For details on how to apply this update, refer to: https://access.redhat.com/articles/11258
- Workaround from the vendor Red Hat Product Security RHSA-2021:4326 · 32 productsxterm should not be used to display less trusted data, e.g. from SSH connections to less trusted remote machines. To avoid attacks via .Xdefaults on kiosk type machines, where graphical user has no permission to execute arbitrary operating system commands or sometimes not even to send hardware keyb…
- No fix planned, says the vendor Red Hat Product Security CVE-2021-31535 · 4 productsOut of support scope
Advisories and patches
- lists.x.orgVendor Advisory
Detection
- Nuclei template
- none so far ProjectDiscovery
- Exploit-DB
- no entry Exploit-DB
- Proof of concept
- PoC-in-GitHubno public repository identifiedread 2026-12-04
- Metasploit modules
- none listed Metasploit Framework
Sources
- NVDCVSS 3.19.8read 2026-10-23
- NVDCVSS 2.07.5read 2026-10-23
- NVDweakness (CWE)CWE-120read 2026-10-23
- FIRST EPSSEPSS score10.4 %read 2026-12-04
- OSVaffected packages—
- GitHub Advisoriesadvisory—
Identifiers
- EUVD-2021-18433same flawENISA EUVD · LicenseRef-ENISA-legal-notice
- GHSA-3vp2-rf63-rc8psame flawGitHub Advisory Database · CC-BY-4.0
- JLSEC-2026-471same flawJulia Security Advisories · CC-BY-4.0
- ALSA-2021:4326advisory covering several CVEsAlmaLinux · MIT
- DLA-2666-1advisory covering several CVEsDebian · LicenseRef-unstated
- DSA-4920-1advisory covering several CVEsDebian · LicenseRef-unstated
- MGASA-2021-0219advisory covering several CVEsMageia · LicenseRef-unstated
- OESA-2021-1235advisory covering several CVEsopenEuler · LicenseRef-unstated
- openSUSE-SU-2021:0807-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2021:0857-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2021:1897-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2024:10918-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- RHSA-2021:3296advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2021:3477advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2021:4326advisory covering several CVEsRed Hat · CC-BY-4.0
- RLSA-2021:4326advisory covering several CVEsRocky Linux · BSD-3-Clause
- SUSE-SU-2021:14748-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2021:1765-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2021:1766-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2021:1892-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2021:1897-1advisory covering several CVEsSUSE · LicenseRef-unstated
- USN-4966-1advisory covering several CVEsUbuntu
- USN-4966-2advisory covering several CVEsUbuntu
Technical details
- CVSS v3 vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Published
- 2021-05-27
- Last modified
- 2026-06-17
- NVD status
- Modified
- GitHub advisory
- GHSA-3vp2-rf63-rc8p
Frequently asked questions
What is CVE-2021-31535?
Is CVE-2021-31535 actively exploited?
What is the CVSS score for CVE-2021-31535?
Running libX11? Hear about its next vulnerability
Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».
No credit card required · No monthly cap on website checks · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
Sources for this record
- CVE Program · CVE Program Terms of Use
- ENISA EU Vulnerability Database · ENISA legal notice §1.2 (reproduction authorised, provided the source is acknowledged)
- FIRST EPSS · EPSS terms of use (free use, attribution requested)
- GitHub Advisory Database · CC-BY-4.0 · GHSA-3vp2-rf63-rc8p
- NVD · Public domain (17 U.S.C. § 105) for NVD-authored data; third-party content under its own terms
- OSV.dev · Per record, as its publisher states it: each row carries the label in sourceLicense when one is served
- Red Hat Product Security (CSAF and VEX) · CC-BY-4.0