Skip to main content
CRITICAL

CVE-2021-31535

CVSS v3

9.8

CRITICAL

EPSS Score

10.6 %

exploit probability, as of 2026-10-19

CISA KEV

No

known exploited

Exploitation

—

SSVC status

Get an alert for each new CVE published for libX11.

Set up CVE WatchFree account · no credit card

Affected and fixed versions

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

  • libX11AlmaLinux:8all versions · fixed in 1.6.8-5.el8and 3 other packages

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

  • 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

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.

Technical details

Published
2021-05-27

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.6% on 2026-10-19, 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).

Running libX11? Hear about its next vulnerability

CVE Watch matches each new CVE to the vendors and products you list (vendor and product, not the version) and puts it in your alerts with its KEV and EPSS status.

Already have an account? Open CVE WatchNo credit card required · No monthly cap on website lookups · 250 API requests/month