SecurityContext

CVE-2021-31535: X.Org X - Remote Code Execution

  • Cve: CVE-2021-31535
  • Name: X.Org X - Remote Code Execution
  • 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.
  • Impact: Attackers can execute arbitrary code on the server, potentially taking full control of the graphical session.
  • Remediation: Update to libX11 version 1.7.1 or later.
  • Vulnerability type: buffer_overflow
  • Vulnerability impact: remote_code_execution
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: critical
  • Cvss score: 9.8
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Epss score: 0.10437
  • Epss percentile: 0.95819
  • Assignee: [email protected]
  • Published at: 2021-05-27T13:15:08Z
  • Age in days: 2007
  • Modified at: 2026-06-17T03:51:58Z
  • Patch available: yes
  • Public exploits total: 3
  • References total: 19
  • Products total: 3
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2021-31535
  • Nvd status: modified
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, oss, projects total, projects, rejected by nvd
  • Not known: requirements, hackerone

Cwe

IdName
CWE-120Buffer Copy without Checking Size of Input

Public exploits

Same in every row:

  • Source: nvd
  • Added date: 2021-05-27
Url
http://packetstormsecurity.com/files/162737/libX11-Insufficient-Length-Check-Injection.html
https://unparalleled.eu/blog/2021/20210518-using-xterm-to-navigate-the-huge-color-space/
https://unparalleled.eu/publications/2021/advisory-unpar-2021-1.txt

References

Same in every row:

  • Source: nvd
UrlTags
https://lists.x.org/archives/xorg-announce/2021-May/003088.htmlVendor Advisory
http://packetstormsecurity.com/files/162737/libX11-Insufficient-Length-Check-Injection.htmlExploit, Third Party Advisory, VDB Entry
https://unparalleled.eu/blog/2021/20210518-using-xterm-to-navigate-the-huge-color-space/Exploit, Third Party Advisory
https://unparalleled.eu/publications/2021/advisory-unpar-2021-1.txtExploit, Third Party Advisory
http://seclists.org/fulldisclosure/2021/May/52Mailing List, Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/05/18/2Mailing List, Third Party Advisory
https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/8d2e02ae650f00c4a53deb625211a0527126c605Third Party Advisory
https://lists.debian.org/debian-lts-announce/2021/05/msg00021.htmlThird Party Advisory
https://lists.freedesktop.org/archives/xorg/Third Party Advisory
https://security.gentoo.org/glsa/202105-16Third Party Advisory

Products

Same in every row:

  • Platform bound: no
  • Sources: nvd
ProductAffectedUrl
x.org:libx11< 1.7.1/v1/products/x.org/libx11
fedoraproject:fedora= 33/v1/products/fedoraproject/fedora
x.org:x_window_system<= x11r7.7/v1/products/x.org/x_window_system

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Exploitation seen: yes
  • Public exploit: yes
  • Public exploit count: 3
  • Public exploit first date: 2021-05-27
  • Remote: yes
  • Exposed hosts: 49161
  • Checked, none or zero: known exploited, known exploited by, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports