CVE-2022-46340
A vulnerability was found in X.Org. This security flaw occurs becuase the swap handler for the XTestFakeInput request of the XTest extension may corrupt the stack if GenericEvents with lengths larger than 32 bytes are sent through a the XTestFakeInput request. This issue can lead to local privileges elevation on systems where the X server is running privileged and remote code execution for ssh X forwarding sessions. This issue does not affect systems where client and server use the same byte order.
What to do
Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 22.04 | xorg-server | Fixed | 2:21.1.3-2ubuntu2.5 | UBUNTU-CVE-2022-46340 |
| Ubuntu 22.04 | xwayland | Fixed | 2:22.1.1-1ubuntu0.4 | UBUNTU-CVE-2022-46340 |
| Ubuntu 20.04 | xorg-server | Fixed | 2:1.20.13-1ubuntu1~20.04.5 | UBUNTU-CVE-2022-46340 |
| Ubuntu 18.04 | xorg-server | Fixed | 2:1.19.6-1ubuntu4.13 | UBUNTU-CVE-2022-46340 |
| Ubuntu 18.04 | xorg-server-hwe-18.04 | Fixed | 2:1.20.8-2ubuntu2.2~18.04.9 | UBUNTU-CVE-2022-46340 |
| Ubuntu 16.04 | xorg-server | Fix pending | 2:1.18.4-0ubuntu0.12+esm5 (Ubuntu Pro) | UBUNTU-CVE-2022-46340 |
| Ubuntu 16.04 | xorg-server-hwe-16.04 | Fix pending | 2:1.19.6-1ubuntu4.1~16.04.6+esm4 (Ubuntu Pro) | UBUNTU-CVE-2022-46340 |
| Ubuntu 14.04 | xorg-server | Fix pending | 2:1.15.1-0ubuntu2.11+esm7 (Ubuntu Pro) | UBUNTU-CVE-2022-46340 |
| Ubuntu 14.04 | xorg-server-lts-utopic | Fix pending | ||
| Ubuntu 14.04 | xorg-server-lts-vivid | Fix pending | ||
| Ubuntu 14.04 | xorg-server-lts-wily | Fix pending | ||
| Ubuntu 14.04 | xorg-server-lts-xenial | Fix pending | ||
| Debian 14 | xorg-server | Fixed | 2:21.1.5-1 | DEBIAN-CVE-2022-46340 |
| Debian 14 | xwayland | Fixed | 2:22.1.6-1 | DEBIAN-CVE-2022-46340 |
| Debian 13 | xorg-server | Fixed | 2:21.1.5-1 | DEBIAN-CVE-2022-46340 |
| Debian 13 | xwayland | Fixed | 2:22.1.6-1 | DEBIAN-CVE-2022-46340 |
| Debian 12 | xorg-server | Fixed | 2:21.1.5-1 | DEBIAN-CVE-2022-46340 |
| Debian 12 | xwayland | Fixed | 2:22.1.6-1 | DEBIAN-CVE-2022-46340 |
| Red Hat Enterprise Linux 9 | tigervnc | Fixed | 0:1.12.0-13.el9_2 | RHSA-2023:2257 |
| Red Hat Enterprise Linux 9 | tigervnc-icons | Fixed | 0:1.12.0-13.el9_2 | RHSA-2023:2257 |
| Red Hat Enterprise Linux 9 | tigervnc-license | Fixed | 0:1.12.0-13.el9_2 | RHSA-2023:2257 |
| Red Hat Enterprise Linux 9 | tigervnc-selinux | Fixed | 0:1.12.0-13.el9_2 | RHSA-2023:2257 |
| Red Hat Enterprise Linux 9 | tigervnc-server | Fixed | 0:1.12.0-13.el9_2 | RHSA-2023:2257 |
| Red Hat Enterprise Linux 9 | tigervnc-server-minimal | Fixed | 0:1.12.0-13.el9_2 | RHSA-2023:2257 |
| Red Hat Enterprise Linux 9 | tigervnc-server-module | Fixed | 0:1.12.0-13.el9_2 | RHSA-2023:2257 |
| Red Hat Enterprise Linux 9 | xorg-x11-server | Fixed | 0:1.20.11-17.el9 | RHSA-2023:2248 |
| Red Hat Enterprise Linux 9 | xorg-x11-server-Xdmx | Fixed | 0:1.20.11-17.el9 | RHSA-2023:2248 |
| Red Hat Enterprise Linux 9 | xorg-x11-server-Xephyr | Fixed | 0:1.20.11-17.el9 | RHSA-2023:2248 |
| Red Hat Enterprise Linux 9 | xorg-x11-server-Xnest | Fixed | 0:1.20.11-17.el9 | RHSA-2023:2248 |
| Red Hat Enterprise Linux 9 | xorg-x11-server-Xorg | Fixed | 0:1.20.11-17.el9 | RHSA-2023:2248 |
| Red Hat Enterprise Linux 9 | xorg-x11-server-Xvfb | Fixed | 0:1.20.11-17.el9 | RHSA-2023:2248 |
| Red Hat Enterprise Linux 9 | xorg-x11-server-Xwayland | Fixed | 0:21.1.3-7.el9 | RHSA-2023:2249 |
| Red Hat Enterprise Linux 9 | xorg-x11-server-common | Fixed | 0:1.20.11-17.el9 | RHSA-2023:2248 |
| Red Hat Enterprise Linux 9 | xorg-x11-server-devel | Fixed | 0:1.20.11-17.el9 | RHSA-2023:2248 |
| Red Hat Enterprise Linux 9 | xorg-x11-server-source | Fixed | 0:1.20.11-17.el9 | RHSA-2023:2248 |
| Red Hat Enterprise Linux 8 | tigervnc | Fixed | 0:1.12.0-15.el8_8 | RHSA-2023:2830 |
| Red Hat Enterprise Linux 8 | tigervnc-icons | Fixed | 0:1.12.0-15.el8_8 | RHSA-2023:2830 |
| Red Hat Enterprise Linux 8 | tigervnc-license | Fixed | 0:1.12.0-15.el8_8 | RHSA-2023:2830 |
| Red Hat Enterprise Linux 8 | tigervnc-selinux | Fixed | 0:1.12.0-15.el8_8 | RHSA-2023:2830 |
| Red Hat Enterprise Linux 8 | tigervnc-server | Fixed | 0:1.12.0-15.el8_8 | RHSA-2023:2830 |
| Red Hat Enterprise Linux 8 | tigervnc-server-minimal | Fixed | 0:1.12.0-15.el8_8 | RHSA-2023:2830 |
| Red Hat Enterprise Linux 8 | tigervnc-server-module | Fixed | 0:1.12.0-15.el8_8 | RHSA-2023:2830 |
| Red Hat Enterprise Linux 8 | xorg-x11-server | Fixed | 0:1.20.11-15.el8 | RHSA-2023:2806 |
| Red Hat Enterprise Linux 8 | xorg-x11-server-Xdmx | Fixed | 0:1.20.11-15.el8 | RHSA-2023:2806 |
| Red Hat Enterprise Linux 8 | xorg-x11-server-Xephyr | Fixed | 0:1.20.11-15.el8 | RHSA-2023:2806 |
| Red Hat Enterprise Linux 8 | xorg-x11-server-Xnest | Fixed | 0:1.20.11-15.el8 | RHSA-2023:2806 |
| Red Hat Enterprise Linux 8 | xorg-x11-server-Xorg | Fixed | 0:1.20.11-15.el8 | RHSA-2023:2806 |
| Red Hat Enterprise Linux 8 | xorg-x11-server-Xvfb | Fixed | 0:1.20.11-15.el8 | RHSA-2023:2806 |
| Red Hat Enterprise Linux 8 | xorg-x11-server-Xwayland | Fixed | 0:21.1.3-10.el8 | RHSA-2023:2805 |
| Red Hat Enterprise Linux 8 | xorg-x11-server-common | Fixed | 0:1.20.11-15.el8 | RHSA-2023:2806 |
| Red Hat Enterprise Linux 8 | xorg-x11-server-devel | Fixed | 0:1.20.11-15.el8 | RHSA-2023:2806 |
| Red Hat Enterprise Linux 8 | xorg-x11-server-source | Fixed | 0:1.20.11-15.el8 | RHSA-2023:2806 |
| Red Hat Enterprise Linux 7 | tigervnc | Fixed | 0:1.8.0-23.el7_9 | RHSA-2023:0045 |
| Red Hat Enterprise Linux 7 | tigervnc-icons | Fixed | 0:1.8.0-23.el7_9 | RHSA-2023:0045 |
| Red Hat Enterprise Linux 7 | tigervnc-license | Fixed | 0:1.8.0-23.el7_9 | RHSA-2023:0045 |
| Red Hat Enterprise Linux 7 | tigervnc-server | Fixed | 0:1.8.0-23.el7_9 | RHSA-2023:0045 |
| Red Hat Enterprise Linux 7 | tigervnc-server-applet | Fixed | 0:1.8.0-23.el7_9 | RHSA-2023:0045 |
| Red Hat Enterprise Linux 7 | tigervnc-server-minimal | Fixed | 0:1.8.0-23.el7_9 | RHSA-2023:0045 |
| Red Hat Enterprise Linux 7 | tigervnc-server-module | Fixed | 0:1.8.0-23.el7_9 | RHSA-2023:0045 |
| Red Hat Enterprise Linux 7 | xorg-x11-server | Fixed | 0:1.20.4-21.el7_9 | RHSA-2023:0046 |
| Red Hat Enterprise Linux 7 | xorg-x11-server-Xdmx | Fixed | 0:1.20.4-21.el7_9 | RHSA-2023:0046 |
| Red Hat Enterprise Linux 7 | xorg-x11-server-Xephyr | Fixed | 0:1.20.4-21.el7_9 | RHSA-2023:0046 |
| Red Hat Enterprise Linux 7 | xorg-x11-server-Xnest | Fixed | 0:1.20.4-21.el7_9 | RHSA-2023:0046 |
| Red Hat Enterprise Linux 7 | xorg-x11-server-Xorg | Fixed | 0:1.20.4-21.el7_9 | RHSA-2023:0046 |
| Red Hat Enterprise Linux 7 | xorg-x11-server-Xvfb | Fixed | 0:1.20.4-21.el7_9 | RHSA-2023:0046 |
| Red Hat Enterprise Linux 7 | xorg-x11-server-Xwayland | Fixed | 0:1.20.4-21.el7_9 | RHSA-2023:0046 |
| Red Hat Enterprise Linux 7 | xorg-x11-server-common | Fixed | 0:1.20.4-21.el7_9 | RHSA-2023:0046 |
| Red Hat Enterprise Linux 7 | xorg-x11-server-devel | Fixed | 0:1.20.4-21.el7_9 | RHSA-2023:0046 |
| Red Hat Enterprise Linux 7 | xorg-x11-server-source | Fixed | 0:1.20.4-21.el7_9 | RHSA-2023:0046 |
| Red Hat Enterprise Linux 6 | xorg-x11-server | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | xorg-x11-server-Xdmx | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | xorg-x11-server-Xephyr | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | xorg-x11-server-Xnest | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | xorg-x11-server-Xorg | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | xorg-x11-server-Xvfb | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | xorg-x11-server-common | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | xorg-x11-server-devel | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | xorg-x11-server-source | Will not fix Out of support scope | ||
| AlmaLinux 9 | tigervnc | Fixed | 1.12.0-13.el9_2 | ALSA-2023:2257 |
| AlmaLinux 9 | tigervnc-icons | Fixed | 1.12.0-13.el9_2 | ALSA-2023:2257 |
| AlmaLinux 9 | tigervnc-license | Fixed | 1.12.0-13.el9_2 | ALSA-2023:2257 |
| AlmaLinux 9 | tigervnc-selinux | Fixed | 1.12.0-13.el9_2 | ALSA-2023:2257 |
| AlmaLinux 9 | tigervnc-server | Fixed | 1.12.0-13.el9_2 | ALSA-2023:2257 |
| AlmaLinux 9 | tigervnc-server-minimal | Fixed | 1.12.0-13.el9_2 | ALSA-2023:2257 |
| AlmaLinux 9 | tigervnc-server-module | Fixed | 1.12.0-13.el9_2 | ALSA-2023:2257 |
| AlmaLinux 9 | xorg-x11-server-Xdmx | Fixed | 1.20.11-17.el9 | ALSA-2023:2248 |
| AlmaLinux 9 | xorg-x11-server-Xephyr | Fixed | 1.20.11-17.el9 | ALSA-2023:2248 |
| AlmaLinux 9 | xorg-x11-server-Xnest | Fixed | 1.20.11-17.el9 | ALSA-2023:2248 |
| AlmaLinux 9 | xorg-x11-server-Xorg | Fixed | 1.20.11-17.el9 | ALSA-2023:2248 |
| AlmaLinux 9 | xorg-x11-server-Xvfb | Fixed | 1.20.11-17.el9 | ALSA-2023:2248 |
| AlmaLinux 9 | xorg-x11-server-Xwayland | Fixed | 21.1.3-7.el9 | ALSA-2023:2249 |
| AlmaLinux 9 | xorg-x11-server-common | Fixed | 1.20.11-17.el9 | ALSA-2023:2248 |
| AlmaLinux 9 | xorg-x11-server-devel | Fixed | 1.20.11-17.el9 | ALSA-2023:2248 |
| AlmaLinux 9 | xorg-x11-server-source | Fixed | 1.20.11-17.el9 | ALSA-2023:2248 |
| AlmaLinux 8 | tigervnc | Fixed | 1.12.0-15.el8_8 | ALSA-2023:2830 |
| AlmaLinux 8 | tigervnc-icons | Fixed | 1.12.0-15.el8_8 | ALSA-2023:2830 |
| AlmaLinux 8 | tigervnc-license | Fixed | 1.12.0-15.el8_8 | ALSA-2023:2830 |
| AlmaLinux 8 | tigervnc-selinux | Fixed | 1.12.0-15.el8_8 | ALSA-2023:2830 |
| AlmaLinux 8 | tigervnc-server | Fixed | 1.12.0-15.el8_8 | ALSA-2023:2830 |
| AlmaLinux 8 | tigervnc-server-minimal | Fixed | 1.12.0-15.el8_8 | ALSA-2023:2830 |
| AlmaLinux 8 | tigervnc-server-module | Fixed | 1.12.0-15.el8_8 | ALSA-2023:2830 |
| AlmaLinux 8 | xorg-x11-server-Xdmx | Fixed | 1.20.11-15.el8 | ALSA-2023:2806 |
| AlmaLinux 8 | xorg-x11-server-Xephyr | Fixed | 1.20.11-15.el8 | ALSA-2023:2806 |
| AlmaLinux 8 | xorg-x11-server-Xnest | Fixed | 1.20.11-15.el8 | ALSA-2023:2806 |
| AlmaLinux 8 | xorg-x11-server-Xorg | Fixed | 1.20.11-15.el8 | ALSA-2023:2806 |
| AlmaLinux 8 | xorg-x11-server-Xvfb | Fixed | 1.20.11-15.el8 | ALSA-2023:2806 |
| AlmaLinux 8 | xorg-x11-server-Xwayland | Fixed | 21.1.3-10.el8 | ALSA-2023:2805 |
| AlmaLinux 8 | xorg-x11-server-common | Fixed | 1.20.11-15.el8 | ALSA-2023:2806 |
| AlmaLinux 8 | xorg-x11-server-devel | Fixed | 1.20.11-15.el8 | ALSA-2023:2806 |
| AlmaLinux 8 | xorg-x11-server-source | Fixed | 1.20.11-15.el8 | ALSA-2023:2806 |
| Alpine Linux 3.24 | xorg-server | Fixed | 21.1.5-r0 | ALPINE-CVE-2022-46340 |
| Alpine Linux 3.24 | xwayland | Fixed | 22.1.6-r0 | ALPINE-CVE-2022-46340 |
| Alpine Linux 3.23 | xorg-server | Fixed | 21.1.5-r0 | ALPINE-CVE-2022-46340 |
| Alpine Linux 3.23 | xwayland | Fixed | 22.1.6-r0 | ALPINE-CVE-2022-46340 |
| Alpine Linux 3.22 | xorg-server | Fixed | 21.1.5-r0 | ALPINE-CVE-2022-46340 |
| Alpine Linux 3.22 | xwayland | Fixed | 22.1.6-r0 | ALPINE-CVE-2022-46340 |
| Alpine Linux 3.21 | xorg-server | Fixed | 21.1.5-r0 | ALPINE-CVE-2022-46340 |
| Alpine Linux 3.21 | xwayland | Fixed | 22.1.6-r0 | ALPINE-CVE-2022-46340 |
| Alpine Linux 3.20 | xorg-server | Fixed | 21.1.5-r0 | ALPINE-CVE-2022-46340 |
| Alpine Linux 3.20 | xwayland | Fixed | 22.1.6-r0 | ALPINE-CVE-2022-46340 |
| Alpine Linux 3.19 | xorg-server | Fixed | 21.1.5-r0 | ALPINE-CVE-2022-46340 |
| Alpine Linux 3.19 | xwayland | Fixed | 22.1.6-r0 | ALPINE-CVE-2022-46340 |
| Alpine Linux 3.18 | xorg-server | Fixed | 21.1.5-r0 | ALPINE-CVE-2022-46340 |
| Alpine Linux 3.18 | xwayland | Fixed | 22.1.6-r0 | ALPINE-CVE-2022-46340 |
| Alpine Linux 3.17 | xorg-server | Fixed | 21.1.5-r0 | ALPINE-CVE-2022-46340 |
| Alpine Linux 3.17 | xwayland | Fixed | 22.1.6-r0 | ALPINE-CVE-2022-46340 |
What the vendor says
As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- xorg-x11-server: affected: xorg-x11-server-1.20.4
Vendor advisories:
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
- https://www.debian.org/security/2022/dsa-5304 (vendor-advisory)
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
References
- https://access.redhat.com/security/cve/CVE-2022-46340
- https://bugzilla.redhat.com/show_bug.cgi?id=2151755
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DXDF2O5PPLE3SVAJJYUOSAD5QZ4TWQ2G/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/5NELB7YDWRABYYBG4UPTHRBDTKJRV5M2/
- https://www.debian.org/security/2022/dsa-5304
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RWTH3SNJ3GKYDSN7I3QDGWYEPSMWU6EP/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Z67QC4C3I2FI2WRFIUPEHKC36J362MLA/
- https://security.gentoo.org/glsa/202305-30
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.