UBUNTU-CVE-2022-46340 (CVE-2022-46340)
Vulnerability from osv_ubuntu – Published: 2022-12-14 00:00 – Updated: 2026-04-22 07:41 – Source websiteA 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.
{
"affected": [
{
"ecosystem_specific": {
"availability": "Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro",
"binaries": [
{
"binary_name": "xdmx",
"binary_version": "2:1.15.1-0ubuntu2.11+esm7"
},
{
"binary_name": "xdmx-tools",
"binary_version": "2:1.15.1-0ubuntu2.11+esm7"
},
{
"binary_name": "xnest",
"binary_version": "2:1.15.1-0ubuntu2.11+esm7"
},
{
"binary_name": "xorg-server-source",
"binary_version": "2:1.15.1-0ubuntu2.11+esm7"
},
{
"binary_name": "xserver-common",
"binary_version": "2:1.15.1-0ubuntu2.11+esm7"
},
{
"binary_name": "xserver-xephyr",
"binary_version": "2:1.15.1-0ubuntu2.11+esm7"
},
{
"binary_name": "xserver-xorg-core",
"binary_version": "2:1.15.1-0ubuntu2.11+esm7"
},
{
"binary_name": "xserver-xorg-xmir",
"binary_version": "2:1.15.1-0ubuntu2.11+esm7"
},
{
"binary_name": "xvfb",
"binary_version": "2:1.15.1-0ubuntu2.11+esm7"
}
]
},
"package": {
"ecosystem": "Ubuntu:Pro:14.04:LTS",
"name": "xorg-server",
"purl": "pkg:deb/ubuntu/xorg-server@2:1.15.1-0ubuntu2.11+esm7?arch=source\u0026distro=trusty/esm"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2:1.15.1-0ubuntu2.11+esm7"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2:1.14.3-3ubuntu2",
"2:1.14.3-3ubuntu3",
"2:1.14.3-3ubuntu4",
"2:1.14.3-5ubuntu1",
"2:1.14.4-1ubuntu1",
"2:1.14.4-1ubuntu2",
"2:1.14.4.901-0ubuntu2",
"2:1.14.5-1ubuntu2",
"2:1.14.5-1ubuntu4",
"2:1.15.0-1ubuntu1",
"2:1.15.0-1ubuntu2",
"2:1.15.0-1ubuntu3",
"2:1.15.0-1ubuntu4",
"2:1.15.0-1ubuntu6",
"2:1.15.0-1ubuntu7",
"2:1.15.1-0ubuntu1",
"2:1.15.1-0ubuntu2",
"2:1.15.1-0ubuntu2.1",
"2:1.15.1-0ubuntu2.4",
"2:1.15.1-0ubuntu2.5",
"2:1.15.1-0ubuntu2.6",
"2:1.15.1-0ubuntu2.7",
"2:1.15.1-0ubuntu2.9",
"2:1.15.1-0ubuntu2.10",
"2:1.15.1-0ubuntu2.11",
"2:1.15.1-0ubuntu2.11+esm2",
"2:1.15.1-0ubuntu2.11+esm3",
"2:1.15.1-0ubuntu2.11+esm4",
"2:1.15.1-0ubuntu2.11+esm5",
"2:1.15.1-0ubuntu2.11+esm6"
]
},
{
"ecosystem_specific": {
"availability": "Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro",
"binaries": [
{
"binary_name": "xdmx",
"binary_version": "2:1.18.4-0ubuntu0.12+esm5"
},
{
"binary_name": "xdmx-tools",
"binary_version": "2:1.18.4-0ubuntu0.12+esm5"
},
{
"binary_name": "xmir",
"binary_version": "2:1.18.4-0ubuntu0.12+esm5"
},
{
"binary_name": "xnest",
"binary_version": "2:1.18.4-0ubuntu0.12+esm5"
},
{
"binary_name": "xorg-server-source",
"binary_version": "2:1.18.4-0ubuntu0.12+esm5"
},
{
"binary_name": "xserver-common",
"binary_version": "2:1.18.4-0ubuntu0.12+esm5"
},
{
"binary_name": "xserver-xephyr",
"binary_version": "2:1.18.4-0ubuntu0.12+esm5"
},
{
"binary_name": "xserver-xorg-core",
"binary_version": "2:1.18.4-0ubuntu0.12+esm5"
},
{
"binary_name": "xserver-xorg-legacy",
"binary_version": "2:1.18.4-0ubuntu0.12+esm5"
},
{
"binary_name": "xserver-xorg-xmir",
"binary_version": "2:1.18.4-0ubuntu0.12+esm5"
},
{
"binary_name": "xvfb",
"binary_version": "2:1.18.4-0ubuntu0.12+esm5"
},
{
"binary_name": "xwayland",
"binary_version": "2:1.18.4-0ubuntu0.12+esm5"
}
]
},
"package": {
"ecosystem": "Ubuntu:Pro:16.04:LTS",
"name": "xorg-server",
"purl": "pkg:deb/ubuntu/xorg-server@2:1.18.4-0ubuntu0.12+esm5?arch=source\u0026distro=esm-infra/xenial"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2:1.18.4-0ubuntu0.12+esm5"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2:1.17.2-1ubuntu9",
"2:1.17.2-1ubuntu10",
"2:1.17.3-2ubuntu1",
"2:1.17.3-2ubuntu2",
"2:1.17.3-2ubuntu3",
"2:1.17.3-2ubuntu4",
"2:1.18.1-1ubuntu3",
"2:1.18.1-1ubuntu4",
"2:1.18.3-1ubuntu1",
"2:1.18.3-1ubuntu2",
"2:1.18.3-1ubuntu2.2",
"2:1.18.3-1ubuntu2.3",
"2:1.18.4-0ubuntu0.1",
"2:1.18.4-0ubuntu0.2",
"2:1.18.4-0ubuntu0.3",
"2:1.18.4-0ubuntu0.4",
"2:1.18.4-0ubuntu0.6",
"2:1.18.4-0ubuntu0.7",
"2:1.18.4-0ubuntu0.8",
"2:1.18.4-0ubuntu0.9",
"2:1.18.4-0ubuntu0.10",
"2:1.18.4-0ubuntu0.11",
"2:1.18.4-0ubuntu0.12",
"2:1.18.4-0ubuntu0.12+esm1",
"2:1.18.4-0ubuntu0.12+esm2",
"2:1.18.4-0ubuntu0.12+esm4"
]
},
{
"ecosystem_specific": {
"availability": "Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro",
"binaries": [
{
"binary_name": "xmir-hwe-16.04",
"binary_version": "2:1.19.6-1ubuntu4.1~16.04.6+esm4"
},
{
"binary_name": "xorg-server-source-hwe-16.04",
"binary_version": "2:1.19.6-1ubuntu4.1~16.04.6+esm4"
},
{
"binary_name": "xserver-xephyr-hwe-16.04",
"binary_version": "2:1.19.6-1ubuntu4.1~16.04.6+esm4"
},
{
"binary_name": "xserver-xorg-core-hwe-16.04",
"binary_version": "2:1.19.6-1ubuntu4.1~16.04.6+esm4"
},
{
"binary_name": "xserver-xorg-dev-hwe-16.04",
"binary_version": "2:1.19.6-1ubuntu4.1~16.04.6+esm4"
},
{
"binary_name": "xserver-xorg-legacy-hwe-16.04",
"binary_version": "2:1.19.6-1ubuntu4.1~16.04.6+esm4"
},
{
"binary_name": "xwayland-hwe-16.04",
"binary_version": "2:1.19.6-1ubuntu4.1~16.04.6+esm4"
}
]
},
"package": {
"ecosystem": "Ubuntu:Pro:16.04:LTS",
"name": "xorg-server-hwe-16.04",
"purl": "pkg:deb/ubuntu/xorg-server-hwe-16.04@2:1.19.6-1ubuntu4.1~16.04.6+esm4?arch=source\u0026distro=esm-infra/xenial"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2:1.19.6-1ubuntu4.1~16.04.6+esm4"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2:1.18.4-1ubuntu6.1~16.04.1",
"2:1.18.4-1ubuntu6.1~16.04.2",
"2:1.19.3-1ubuntu1~16.04.2",
"2:1.19.3-1ubuntu1~16.04.3",
"2:1.19.3-1ubuntu1~16.04.4",
"2:1.19.5-0ubuntu2~16.04.1",
"2:1.19.6-1ubuntu4~16.04.1",
"2:1.19.6-1ubuntu4.1~16.04.1",
"2:1.19.6-1ubuntu4.1~16.04.2",
"2:1.19.6-1ubuntu4.1~16.04.3",
"2:1.19.6-1ubuntu4.1~16.04.4",
"2:1.19.6-1ubuntu4.1~16.04.5",
"2:1.19.6-1ubuntu4.1~16.04.6",
"2:1.19.6-1ubuntu4.1~16.04.6+esm1",
"2:1.19.6-1ubuntu4.1~16.04.6+esm3"
]
},
{
"ecosystem_specific": {
"availability": "No subscription required",
"binaries": [
{
"binary_name": "xdmx",
"binary_version": "2:1.19.6-1ubuntu4.13"
},
{
"binary_name": "xdmx-tools",
"binary_version": "2:1.19.6-1ubuntu4.13"
},
{
"binary_name": "xmir",
"binary_version": "2:1.19.6-1ubuntu4.13"
},
{
"binary_name": "xnest",
"binary_version": "2:1.19.6-1ubuntu4.13"
},
{
"binary_name": "xorg-server-source",
"binary_version": "2:1.19.6-1ubuntu4.13"
},
{
"binary_name": "xserver-common",
"binary_version": "2:1.19.6-1ubuntu4.13"
},
{
"binary_name": "xserver-xephyr",
"binary_version": "2:1.19.6-1ubuntu4.13"
},
{
"binary_name": "xserver-xorg-core",
"binary_version": "2:1.19.6-1ubuntu4.13"
},
{
"binary_name": "xserver-xorg-legacy",
"binary_version": "2:1.19.6-1ubuntu4.13"
},
{
"binary_name": "xserver-xorg-xmir",
"binary_version": "2:1.19.6-1ubuntu4.13"
},
{
"binary_name": "xvfb",
"binary_version": "2:1.19.6-1ubuntu4.13"
},
{
"binary_name": "xwayland",
"binary_version": "2:1.19.6-1ubuntu4.13"
}
]
},
"package": {
"ecosystem": "Ubuntu:18.04:LTS",
"name": "xorg-server",
"purl": "pkg:deb/ubuntu/xorg-server@2:1.19.6-1ubuntu4.13?arch=source\u0026distro=bionic"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2:1.19.6-1ubuntu4.13"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2:1.19.5-0ubuntu2",
"2:1.19.6-1ubuntu1",
"2:1.19.6-1ubuntu2",
"2:1.19.6-1ubuntu3",
"2:1.19.6-1ubuntu4",
"2:1.19.6-1ubuntu4.1",
"2:1.19.6-1ubuntu4.2",
"2:1.19.6-1ubuntu4.3",
"2:1.19.6-1ubuntu4.4",
"2:1.19.6-1ubuntu4.5",
"2:1.19.6-1ubuntu4.6",
"2:1.19.6-1ubuntu4.7",
"2:1.19.6-1ubuntu4.8",
"2:1.19.6-1ubuntu4.9",
"2:1.19.6-1ubuntu4.10",
"2:1.19.6-1ubuntu4.11",
"2:1.19.6-1ubuntu4.12"
]
},
{
"ecosystem_specific": {
"availability": "No subscription required",
"binaries": [
{
"binary_name": "xorg-server-source-hwe-18.04",
"binary_version": "2:1.20.8-2ubuntu2.2~18.04.9"
},
{
"binary_name": "xserver-xephyr-hwe-18.04",
"binary_version": "2:1.20.8-2ubuntu2.2~18.04.9"
},
{
"binary_name": "xserver-xorg-core-hwe-18.04",
"binary_version": "2:1.20.8-2ubuntu2.2~18.04.9"
},
{
"binary_name": "xserver-xorg-dev-hwe-18.04",
"binary_version": "2:1.20.8-2ubuntu2.2~18.04.9"
},
{
"binary_name": "xserver-xorg-legacy-hwe-18.04",
"binary_version": "2:1.20.8-2ubuntu2.2~18.04.9"
},
{
"binary_name": "xwayland-hwe-18.04",
"binary_version": "2:1.20.8-2ubuntu2.2~18.04.9"
}
]
},
"package": {
"ecosystem": "Ubuntu:18.04:LTS",
"name": "xorg-server-hwe-18.04",
"purl": "pkg:deb/ubuntu/xorg-server-hwe-18.04@2:1.20.8-2ubuntu2.2~18.04.9?arch=source\u0026distro=bionic"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2:1.20.8-2ubuntu2.2~18.04.9"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2:1.20.1-3ubuntu2.1~18.04.1",
"2:1.20.4-1ubuntu3~18.04.1",
"2:1.20.5+git20191008-0ubuntu1~18.04.1",
"2:1.20.8-2ubuntu2.1~18.04.1",
"2:1.20.8-2ubuntu2.2~18.04.1",
"2:1.20.8-2ubuntu2.2~18.04.2",
"2:1.20.8-2ubuntu2.2~18.04.3",
"2:1.20.8-2ubuntu2.2~18.04.4",
"2:1.20.8-2ubuntu2.2~18.04.5",
"2:1.20.8-2ubuntu2.2~18.04.6",
"2:1.20.8-2ubuntu2.2~18.04.7",
"2:1.20.8-2ubuntu2.2~18.04.8"
]
},
{
"ecosystem_specific": {
"availability": "No subscription required",
"binaries": [
{
"binary_name": "xdmx",
"binary_version": "2:1.20.13-1ubuntu1~20.04.5"
},
{
"binary_name": "xdmx-tools",
"binary_version": "2:1.20.13-1ubuntu1~20.04.5"
},
{
"binary_name": "xnest",
"binary_version": "2:1.20.13-1ubuntu1~20.04.5"
},
{
"binary_name": "xorg-server-source",
"binary_version": "2:1.20.13-1ubuntu1~20.04.5"
},
{
"binary_name": "xserver-common",
"binary_version": "2:1.20.13-1ubuntu1~20.04.5"
},
{
"binary_name": "xserver-xephyr",
"binary_version": "2:1.20.13-1ubuntu1~20.04.5"
},
{
"binary_name": "xserver-xorg-core",
"binary_version": "2:1.20.13-1ubuntu1~20.04.5"
},
{
"binary_name": "xserver-xorg-legacy",
"binary_version": "2:1.20.13-1ubuntu1~20.04.5"
},
{
"binary_name": "xvfb",
"binary_version": "2:1.20.13-1ubuntu1~20.04.5"
},
{
"binary_name": "xwayland",
"binary_version": "2:1.20.13-1ubuntu1~20.04.5"
}
]
},
"package": {
"ecosystem": "Ubuntu:20.04:LTS",
"name": "xorg-server",
"purl": "pkg:deb/ubuntu/xorg-server@2:1.20.13-1ubuntu1~20.04.5?arch=source\u0026distro=focal"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2:1.20.13-1ubuntu1~20.04.5"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2:1.20.5+git20191008-0ubuntu1",
"2:1.20.6-1ubuntu1",
"2:1.20.7-2ubuntu1",
"2:1.20.7-2ubuntu2",
"2:1.20.8-2ubuntu2",
"2:1.20.8-2ubuntu2.1",
"2:1.20.8-2ubuntu2.2",
"2:1.20.8-2ubuntu2.3",
"2:1.20.8-2ubuntu2.4",
"2:1.20.8-2ubuntu2.6",
"2:1.20.9-2ubuntu1.1~20.04.1",
"2:1.20.9-2ubuntu1.2~20.04.1",
"2:1.20.9-2ubuntu1.2~20.04.2",
"2:1.20.11-1ubuntu1~20.04.2",
"2:1.20.13-1ubuntu1~20.04.2",
"2:1.20.13-1ubuntu1~20.04.3",
"2:1.20.13-1ubuntu1~20.04.4"
]
},
{
"ecosystem_specific": {
"availability": "No subscription required",
"binaries": [
{
"binary_name": "xnest",
"binary_version": "2:21.1.3-2ubuntu2.5"
},
{
"binary_name": "xorg-server-source",
"binary_version": "2:21.1.3-2ubuntu2.5"
},
{
"binary_name": "xserver-common",
"binary_version": "2:21.1.3-2ubuntu2.5"
},
{
"binary_name": "xserver-xephyr",
"binary_version": "2:21.1.3-2ubuntu2.5"
},
{
"binary_name": "xserver-xorg-core",
"binary_version": "2:21.1.3-2ubuntu2.5"
},
{
"binary_name": "xserver-xorg-legacy",
"binary_version": "2:21.1.3-2ubuntu2.5"
},
{
"binary_name": "xvfb",
"binary_version": "2:21.1.3-2ubuntu2.5"
}
]
},
"package": {
"ecosystem": "Ubuntu:22.04:LTS",
"name": "xorg-server",
"purl": "pkg:deb/ubuntu/xorg-server@2:21.1.3-2ubuntu2.5?arch=source\u0026distro=jammy"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2:21.1.3-2ubuntu2.5"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2:1.20.13-1ubuntu1",
"2:1.20.13-1ubuntu2",
"2:1.20.14-1ubuntu1",
"2:21.1.3-2ubuntu2",
"2:21.1.3-2ubuntu2.1",
"2:21.1.3-2ubuntu2.2",
"2:21.1.3-2ubuntu2.3",
"2:21.1.3-2ubuntu2.4"
]
},
{
"ecosystem_specific": {
"availability": "No subscription required",
"binaries": [
{
"binary_name": "xwayland",
"binary_version": "2:22.1.1-1ubuntu0.4"
}
]
},
"package": {
"ecosystem": "Ubuntu:22.04:LTS",
"name": "xwayland",
"purl": "pkg:deb/ubuntu/xwayland@2:22.1.1-1ubuntu0.4?arch=source\u0026distro=jammy"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2:22.1.1-1ubuntu0.4"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2:21.1.2-0ubuntu1",
"2:21.1.3-1",
"2:21.1.3-1ubuntu1",
"2:21.1.4-1",
"2:22.1.0-1",
"2:22.1.1-1",
"2:22.1.1-1ubuntu0.1",
"2:22.1.1-1ubuntu0.2",
"2:22.1.1-1ubuntu0.3"
]
}
],
"aliases": [],
"details": "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.",
"id": "UBUNTU-CVE-2022-46340",
"modified": "2026-04-22T07:41:45Z",
"published": "2022-12-14T00:00:00Z",
"references": [
{
"type": "REPORT",
"url": "https://ubuntu.com/security/CVE-2022-46340"
},
{
"type": "ADVISORY",
"url": "https://ubuntu.com/security/notices/USN-5778-1"
},
{
"type": "ADVISORY",
"url": "https://ubuntu.com/security/notices/USN-5778-2"
},
{
"type": "REPORT",
"url": "https://www.cve.org/CVERecord?id=CVE-2022-46340"
}
],
"related": [
"USN-5778-1",
"USN-5778-2"
],
"schema_version": "1.7.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "medium",
"type": "Ubuntu"
}
],
"upstream": [
"CVE-2022-46340"
]
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.