---
id: CVE-2024-21885
title: 'Xorg-x11-server: heap buffer overflow in xisenddevicehierarchyevent'
summary: >-
  A flaw was found in X.Org server. In the XISendDeviceHierarchyEvent function,
  it is possible to exceed the allocated array length when certain new device
  IDs are added to the xXIHierarchyInfo struct. This can trigger a heap buffer
  overfl…
severity: high
cvss: 7.8
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'
cvssSource: cna
cwe:
  - CWE-122
vendor: Red Hat
product: xorg-server
affected:
  - xorg-server < 21.1.11
  - xwayland < 23.2.4
  - tigervnc (all versions)
  - xorg-x11-server (all versions)
  - tigervnc (all versions)
  - tigervnc (all versions)
  - xorg-x11-server (all versions)
  - xorg-x11-server-Xwayland (all versions)
  - tigervnc (all versions)
  - tigervnc (all versions)
  - tigervnc (all versions)
  - tigervnc (all versions)
  - tigervnc (all versions)
  - tigervnc (all versions)
  - tigervnc (all versions)
  - tigervnc (all versions)
  - tigervnc (all versions)
  - xorg-x11-server (all versions)
  - xorg-x11-server-Xwayland (all versions)
  - tigervnc (all versions)
  - tigervnc (all versions)
  - xorg-x11-server
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: total
  timestamp: '2024-04-26T16:17:45.889071Z'
published: '2024-02-28'
updated: '2026-11-04'
sourceUpdated: '2026-11-04T21:10:01.871Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2024-21885'
references:
  - url: 'https://access.redhat.com/errata/RHSA-2024:0320'
    label: 'RHSA-2024:0320'
  - url: 'https://access.redhat.com/errata/RHSA-2024:0557'
    label: 'RHSA-2024:0557'
  - url: 'https://access.redhat.com/errata/RHSA-2024:0558'
    label: 'RHSA-2024:0558'
  - url: 'https://access.redhat.com/errata/RHSA-2024:0597'
    label: 'RHSA-2024:0597'
  - url: 'https://access.redhat.com/errata/RHSA-2024:0607'
    label: 'RHSA-2024:0607'
  - url: 'https://access.redhat.com/errata/RHSA-2024:0614'
    label: 'RHSA-2024:0614'
  - url: 'https://access.redhat.com/errata/RHSA-2024:0617'
    label: 'RHSA-2024:0617'
  - url: 'https://access.redhat.com/errata/RHSA-2024:0621'
    label: 'RHSA-2024:0621'
  - url: 'https://access.redhat.com/errata/RHSA-2024:0626'
    label: 'RHSA-2024:0626'
  - url: 'https://access.redhat.com/errata/RHSA-2024:0629'
    label: 'RHSA-2024:0629'
  - url: 'https://access.redhat.com/errata/RHSA-2024:2169'
    label: 'RHSA-2024:2169'
  - url: 'https://access.redhat.com/errata/RHSA-2024:2170'
    label: 'RHSA-2024:2170'
  - url: 'https://access.redhat.com/errata/RHSA-2024:2995'
    label: 'RHSA-2024:2995'
  - url: 'https://access.redhat.com/errata/RHSA-2024:2996'
    label: 'RHSA-2024:2996'
  - url: 'https://access.redhat.com/errata/RHSA-2025:12751'
    label: 'RHSA-2025:12751'
  - url: 'https://access.redhat.com/security/cve/CVE-2024-21885'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2256540'
    label: RHBZ#2256540
tags:
  - cve.org
epss: 0.0142
epssPercentile: 0.7291
ingestedAt: '2026-11-05T21:36:00.601Z'
---

## Overview

A flaw was found in X.Org server. In the XISendDeviceHierarchyEvent function, it is possible to exceed the allocated array length when certain new device IDs are added to the xXIHierarchyInfo struct. This can trigger a heap buffer overflow condition, which may lead to an application crash or remote code execution in SSH X11 forwarding environments.

## Affected

- `xorg-server < 21.1.11`
- `xwayland < 23.2.4`
- `tigervnc (all versions)`
- `xorg-x11-server (all versions)`
- `tigervnc (all versions)`
- `tigervnc (all versions)`
- `xorg-x11-server (all versions)`
- `xorg-x11-server-Xwayland (all versions)`
- `tigervnc (all versions)`
- `tigervnc (all versions)`
- `tigervnc (all versions)`
- `tigervnc (all versions)`
- `tigervnc (all versions)`
- `tigervnc (all versions)`
- `tigervnc (all versions)`
- `tigervnc (all versions)`
- `tigervnc (all versions)`
- `xorg-x11-server (all versions)`
- `xorg-x11-server-Xwayland (all versions)`
- `tigervnc (all versions)`
- `tigervnc (all versions)`
- `xorg-x11-server`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

### Workarounds

Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
