Skip to main content
No exploitation reportedFix available

CVE-2021-31535

No exploitation reported by the sources we read.

  • Published2021-05-27
  • WeaknessCWE-120

Am I 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
  1. 2021-05-2713:15CVE publishedNVD

Versions per branch

NVD
Fedoraproject fedora
BranchAffectedFixed in
33.x= 33no fix published
X.org libx11
BranchAffectedFixed in
1.7< 1.7.11.7.1
X.org x window system
BranchAffectedFixed in
—≤ x11r7.7no fix published

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

  • CVE-2021-31535 Red Hat Product Security80 products fixed · 4 known affected

    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

  • RHSA-2021:4326 Red Hat Product Security32 products fixed

    Red Hat Security Advisory: libX11 security update

  • RHSA-2021:3477 Red Hat Product Security4 products fixed

    Red Hat Security Advisory: RHV-H security update (redhat-virtualization-host) 4.3.18

  • RHBA-2021:3472 Red Hat Product Security1 product fixed

    Red Hat Bug Fix Advisory: Red Hat Ansible Tower 3.8.4-1 - Container

  • RHSA-2021:3296 Red Hat Product Security43 products fixed

    Red Hat Security Advisory: libX11 security update

Full record on NVD

Fix

  1. 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
  2. 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
  3. 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
  4. 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…
  5. No fix planned, says the vendor Red Hat Product Security CVE-2021-31535 · 4 productsOut of support scope

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

Identifiers

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?

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.

Is CVE-2021-31535 actively exploited?

Active exploitation of CVE-2021-31535 has not been confirmed. Its EPSS score was 10.4% on 2026-12-04, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2021-31535?

CVE-2021-31535 has a CVSS v3 base score of 9.8 (Critical severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.

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

Sources for this record