Skip to content
Heist/ feed
Back to feed
CriticalFix available

libx11 — security advisory

Type: advisorySources: OSVAdvisory ID: DEBIAN-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.

Products
libx11
Affected versions
Not specified
Fixed versions
2:1.7.1-1
CVEs
CVE-2021-31535
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 00:42 UTC · Revision 1

Source evidence

DEBIAN-CVE-2021-31535

core-osv · Original source

Published 27 May 2021, 13:15 UTC

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.

osv:DEBIAN-CVE-2021-31535

libx11

Fixed versions: 2:1.7.1-1

libx11

Fixed versions: 2:1.7.1-1

libx11

Fixed versions: 2:1.7.1-1

Complete source record
{
  "id": "544ad50eba16779db7b2bfc0c3e7b9cfa29f055d126b90ddff8a168d7f59d32d",
  "url": "https://osv.dev/vulnerability/DEBIAN-CVE-2021-31535",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "DEBIAN-CVE-2021-31535",
    "summary": "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.",
    "evidence": "osv:DEBIAN-CVE-2021-31535",
    "products": [
      {
        "name": {
          "value": "libx11",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2:1.7.1-1",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "libx11",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2:1.7.1-1",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "libx11",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2:1.7.1-1",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "critical",
    "structured": {
      "id": "DEBIAN-CVE-2021-31535",
      "aliases": [
        "DEBIAN-CVE-2021-31535"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "2:1.7.1-1"
                }
              ]
            }
          ],
          "package": {
            "name": "libx11",
            "purl": "pkg:deb/debian/libx11?arch=source&distro=bookworm",
            "ecosystem": "Debian:12"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2021-31535.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "2:1.7.1-1"
                }
              ]
            }
          ],
          "package": {
            "name": "libx11",
            "purl": "pkg:deb/debian/libx11?arch=source&distro=trixie",
            "ecosystem": "Debian:13"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2021-31535.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "2:1.7.1-1"
                }
              ]
            }
          ],
          "package": {
            "name": "libx11",
            "purl": "pkg:deb/debian/libx11?arch=source&distro=forky",
            "ecosystem": "Debian:14"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2021-31535.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        }
      ],
      "modified": "2026-10-23T18:03:37.430056726Z",
      "provider": "osv",
      "upstream": [
        "CVE-2021-31535"
      ],
      "references": [
        "https://security-tracker.debian.org/tracker/CVE-2021-31535"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2021-31535",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 422032,
  "published_at": "2021-05-27T13:15:08.24+00:00"
}