CVE-2021-31535: LookupCol.c in X.Org X through X11R7.7 and libX11 before 1.7.1 might allow remote attackers to execute arbitra
CVE-2021-31535 is a critical-severity flaw (CVSS 9.8) affecting libx11, x window system, fedora. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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
Why this priority
- Critical severity
- EPSS top 4%: very likely to be exploited
- Public exploit reference
- Remotely exploitable, no login, no user action
A fixed release or distro patch exists.
Risk facts
| CVSS score | 9.8 (Critical) |
| Attack vector | Network (remote) |
| Attack complexity | Low |
| Privileges needed | None |
| User interaction | None |
| EPSS exploit chance | 10.6% (top 4%) |
| CISA exploited list | No |
| Weakness | CWE-120 |
| Published | 2021-05-27 |
| Last modified | 2026-06-17 |
Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2021-31535?
libx11: upgrade to 1.7.1; x window system: upgrade to newer than x11r7.7; fedora: mitigate or apply the listed mitigation. Exact commands for each OS are on this page.
Is CVE-2021-31535 being exploited?
CVE-2021-31535 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2021-31535 affect?
CVE-2021-31535 affects libx11, x window system, fedora. Severity is critical (CVSS 9.8). 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-n
How urgent is CVE-2021-31535?
Priority 68/100. Critical severity; EPSS top 4%: very likely to be exploited; Public exploit reference; Remotely exploitable, no login, no user action
Related CVEs
- CVE-2023-43787 HIGH 7.8 UPGRADE MITIGATE A vulnerability was found in libX11 due to an integer overflow within the XCreateImage() function
- CVE-2023-43786 MEDIUM 5.5 UPGRADE MITIGATE A vulnerability was found in libX11 due to an infinite loop within the PutSubImage() function
- CVE-2023-43785 MEDIUM 6.5 UPGRADE MITIGATE A vulnerability was found in libX11 due to a boundary condition within the _XkbReadKeySyms() function
- CVE-2023-3138 HIGH 7.5 UPGRADE MITIGATE A vulnerability was found in libX11
- CVE-2020-14363 HIGH 7.8 UPGRADE MITIGATE An integer overflow vulnerability leading to a double-free was found in libX11