xorg-server, xwayland — security advisory
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.
- Products
- xorg-server, xwayland
- Affected versions
- Not specified
- Fixed versions
- 2:21.1.5-1, 2:22.1.6-1
- CVEs
- CVE-2022-46340
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 30 Oct 2026, 15:37 UTC · Revision 1
Source evidence
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.
osv:DEBIAN-CVE-2022-46340
xorg-server
Fixed versions: 2:21.1.5-1
xorg-server
Fixed versions: 2:21.1.5-1
xorg-server
Fixed versions: 2:21.1.5-1
xwayland
Fixed versions: 2:22.1.6-1
xwayland
Fixed versions: 2:22.1.6-1
xwayland
Fixed versions: 2:22.1.6-1
Complete source record
{
"id": "880a79c59500a7f921bdd8c408dd499ce9dbeb1c4f4c8a029d5a638839d9c243",
"url": "https://osv.dev/vulnerability/DEBIAN-CVE-2022-46340",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "DEBIAN-CVE-2022-46340",
"summary": "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.",
"evidence": "osv:DEBIAN-CVE-2022-46340",
"products": [
{
"name": {
"value": "xorg-server",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "2:21.1.5-1",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "xorg-server",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "2:21.1.5-1",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "xorg-server",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "2:21.1.5-1",
"evidence": "/affected/2/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "xwayland",
"evidence": "/affected/3/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "2:22.1.6-1",
"evidence": "/affected/3/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "xwayland",
"evidence": "/affected/4/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "2:22.1.6-1",
"evidence": "/affected/4/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "xwayland",
"evidence": "/affected/5/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "2:22.1.6-1",
"evidence": "/affected/5/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "DEBIAN-CVE-2022-46340",
"aliases": [
"DEBIAN-CVE-2022-46340"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "2:21.1.5-1"
}
]
}
],
"package": {
"name": "xorg-server",
"purl": "pkg:deb/debian/xorg-server?arch=source&distro=bookworm",
"ecosystem": "Debian:12"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-46340.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "2:21.1.5-1"
}
]
}
],
"package": {
"name": "xorg-server",
"purl": "pkg:deb/debian/xorg-server?arch=source&distro=trixie",
"ecosystem": "Debian:13"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-46340.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "2:21.1.5-1"
}
]
}
],
"package": {
"name": "xorg-server",
"purl": "pkg:deb/debian/xorg-server?arch=source&distro=forky",
"ecosystem": "Debian:14"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-46340.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "2:22.1.6-1"
}
]
}
],
"package": {
"name": "xwayland",
"purl": "pkg:deb/debian/xwayland?arch=source&distro=bookworm",
"ecosystem": "Debian:12"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-46340.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "2:22.1.6-1"
}
]
}
],
"package": {
"name": "xwayland",
"purl": "pkg:deb/debian/xwayland?arch=source&distro=trixie",
"ecosystem": "Debian:13"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-46340.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "2:22.1.6-1"
}
]
}
],
"package": {
"name": "xwayland",
"purl": "pkg:deb/debian/xwayland?arch=source&distro=forky",
"ecosystem": "Debian:14"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-46340.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
}
],
"modified": "2026-10-15T08:03:10.113874493Z",
"provider": "osv",
"upstream": [
"CVE-2022-46340"
],
"references": [
"https://security-tracker.debian.org/tracker/CVE-2022-46340"
]
},
"related_cves": [
{
"value": "CVE-2022-46340",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 325498,
"published_at": "2022-12-14T21:15:13.11+00:00"
}