Wiz Agents & Workflows are here

CVE-2021-31535
NixOS vulnerability analysis and mitigation

Overview

CVE-2021-31535 affects libX11, the core X11 protocol client library, through X11R7.7 and versions before 1.7.1. The vulnerability stems from missing request length checks in the LookupCol.c component, which could allow remote attackers to execute arbitrary code. The issue was discovered in May 2021 and involves insufficient validation of string parameters in XLookupColor() and other X libraries functions (CVE-Mitre, OSS-Security).

Technical details

The vulnerability exists in the XLookupColor request handling where a client can send color-name requests with a name longer than the maximum size allowed by the protocol. The flaw allows injection of X11 protocol commands when processing overlong color names, similar to SQL injection attacks. The issue specifically occurs because the code does not properly validate the length of string parameters before sending them to the X server (Unparalleled Blog).

Impact

When successfully exploited, this vulnerability can allow attackers to inject arbitrary X protocol requests, potentially leading to authentication bypass, denial of service, or execution of arbitrary code. In specific cases, attackers can disable X server authentication completely, allowing unauthorized access to the X server session including keyboard and mouse input data (Red Hat CVE).

Mitigation and workarounds

The vulnerability was patched in libX11 version 1.7.1 with commit 8d2e02ae650f00c4a53deb625211a0527126c605, which adds proper validation of request data length. Additionally, XTerm version 367 includes mitigation by adding validation for color name lengths. Until patches can be applied, users should avoid using xterm to display untrusted data, particularly from SSH connections to untrusted machines (OSS-Security).

Additional resources


SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-30892HIGH7.8
  • NixOSNixOS
  • crun
NoYesMar 26, 2026
CVE-2026-33223MEDIUM5.4
  • NixOSNixOS
  • nats-fips
NoYesMar 25, 2026
CVE-2026-33222MEDIUM4.9
  • NixOSNixOS
  • nats-fips
NoYesMar 25, 2026
CVE-2026-33249MEDIUM4.3
  • NixOSNixOS
  • k3s-1.32
NoYesMar 25, 2026
CVE-2026-33248MEDIUM4.2
  • NixOSNixOS
  • github.com/nats-io/nats-server/v2
NoYesMar 25, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management