A use-after-free caused by lack of lifecycle management when adding / removing XInput master devices in X.org X Server before 21.1.25 and XWayland before 24.1.14 could be used by authenticated X Clients to crash the X server or potentially execute code in X server context.
https://gitlab.freedesktop.org/xorg/xserver/-/commit/be572634158850fff4e9829cee88db08d30c9743