CVE-2021-4011: X.Org Server SwapCreateRegister Out-Of-Bounds Access Local Privilege Escalation Vulnerability

Published Dec 14, 2021
·
Updated

A flaw was found in xorg-x11-server in versions before 21.1.2 and before 1.20.14. An out-of-bounds access can occur in the SwapCreateRegister function. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.

Other sources

This vulnerability allows local attackers to escalate privileges on affected installations of X.Org Server. An attacker must first obtain the ability to execute low-privileged code on the target system in order to exploit this vulnerability. The specific flaw exists within the handling of SwapCreateRegister requests. The issue results from the lack of proper validation of user-supplied data, which can result in a memory access past the end of an allocated buffer. An attacker can leverage this vulnerability to escalate privileges and execute arbitrary code in the context of root.

ZDI

Affected Software

29 affected componentsFixes available
ubuntu/xorg-server<2:1.19.6-1ubuntu4.10
2:1.19.6-1ubuntu4.10
ubuntu/xorg-server<2:1.20.13-1ubuntu1~20.04.2
2:1.20.13-1ubuntu1~20.04.2
ubuntu/xorg-server<2:1.20.11-1ubuntu1.2
2:1.20.11-1ubuntu1.2
ubuntu/xorg-server<2:1.20.13-1ubuntu1.1
2:1.20.13-1ubuntu1.1
ubuntu/xorg-server<21.1.2
21.1.2
ubuntu/xorg-server<2:1.15.1-0ubuntu2.11+
2:1.15.1-0ubuntu2.11+
ubuntu/xorg-server<2:1.18.4-0ubuntu0.12+
2:1.18.4-0ubuntu0.12+
ubuntu/xorg-server<2:1.20.13-1ubuntu2
2:1.20.13-1ubuntu2
ubuntu/xorg-server<2:1.20.13-1ubuntu2
2:1.20.13-1ubuntu2
ubuntu/xorg-server<2:1.20.13-1ubuntu2
2:1.20.13-1ubuntu2
ubuntu/xorg-server-hwe-16.04<2:1.19.6-1ubuntu4.1~16.04.6+
2:1.19.6-1ubuntu4.1~16.04.6+
ubuntu/xorg-server-hwe-18.04<2:1.20.8-2ubuntu2.2~18.04.6
2:1.20.8-2ubuntu2.2~18.04.6
ubuntu/xwayland<2:21.1.1-0ubuntu1.1
2:21.1.1-0ubuntu1.1
ubuntu/xwayland<2:21.1.2-0ubuntu1.1
2:21.1.2-0ubuntu1.1
ubuntu/xwayland<21.1.4
21.1.4
ubuntu/xwayland<2:21.1.3-1ubuntu1
2:21.1.3-1ubuntu1
ubuntu/xwayland<2:21.1.3-1ubuntu1
2:21.1.3-1ubuntu1
ubuntu/xwayland<2:21.1.3-1ubuntu1
2:21.1.3-1ubuntu1
debian/xorg-server
2:1.20.4-1+deb10u42:1.20.4-1+deb10u132:1.20.11-1+deb11u112:21.1.7-3+deb12u52:21.1.11-2
debian/xwayland
2:22.1.9-12:23.2.4-1
X.Org Server
X.Org X Server<1.20.14
X.Org X Server=21.1.0
X.Org X Server=21.1.1
Fedoraproject Fedora=34
Fedoraproject Fedora=35
Debian Debian Linux=9.0
Debian Debian Linux=10.0
Debian Debian Linux=11.0

Event History

Dec 14, 2021
CVE Published
via Ubuntu·12:00 AM
Dec 17, 2021
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionWeakness
Jan 12, 2024
Data Sourced
via Launchpad·12:00 AM
Description
Feb 26, 2025
Advisory Published
via ZDI·07:39 PM

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is CVE-2021-4011?

CVE-2021-4011 is a vulnerability that allows local attackers to escalate privileges on affected installations of X.Org Server.

2

How can this vulnerability be exploited?

An attacker must first obtain the ability to execute low-privileged code on the target system in order to exploit this vulnerability.

3

What is the severity of CVE-2021-4011?

CVE-2021-4011 has a severity rating of 7.8 (High).

4

Which versions of X.Org Server are affected by CVE-2021-4011?

Versions up to and including 21.1.2 of X.Org Server are affected by CVE-2021-4011.

5

How can I fix CVE-2021-4011?

To fix CVE-2021-4011, update X.Org Server to version 21.1.2 or later.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203