# CVE-2023-0494: Use after free in xorg-x11-server

> A use-after-free in X.Org allows local privilege escalation and remote code execution via SSH X forwarding.

- **Severity:** High 7.8 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 27 Mar 2023
- **Updated:** 24 Feb 2025
- **Also known as:** ALSA-2023:0622, ALSA-2023:0662, DEBIAN-CVE-2023-0494, DLA-3310-1, DSA-5342-1, GHSA-5v6x-2hpj-c37x, MGASA-2023-0118, OESA-2023-1127, RHSA-2023:0622, RHSA-2023:0623, RHSA-2023:0662, RHSA-2023:0663, RHSA-2023:0664, RHSA-2023:0665, RHSA-2023:0671, RHSA-2023:0675, RLSA-2023:0622, RLSA-2023:0662, SUSE-SU-2023:0282-1, SUSE-SU-2023:0284-1, SUSE-SU-2023:0285-1, SUSE-SU-2023:0286-1, SUSE-SU-2023:0287-1, SUSE-SU-2023:0288-1, SUSE-SU-2023:0289-1, UBUNTU-CVE-2023-0494, USN-5846-1, openSUSE-SU-2024:12664-1, openSUSE-SU-2024:12665-1

## What is CVE-2023-0494?

CVE-2023-0494 is a high-severity use after free vulnerability in Fedoraproject Fedora, published on 27 Mar 2023. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

A vulnerability was found in X.Org. This issue occurs due to a dangling pointer in DeepCopyPointerClasses that can be exploited by ProcXkbSetDeviceInfo() and ProcXkbGetDeviceInfo() to read and write into freed memory. This can lead to local privilege elevation on systems where the X server runs privileged and remote code execution for ssh X forwarding sessions.

Weakness: CWE-416 (Use After Free)

## Which versions are affected by CVE-2023-0494?

It affects 18 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `tigervnc` | AlmaLinux:8 | All versions | 1.12.0-9.el8_7.1 |
| `tigervnc-icons` | AlmaLinux:8 | All versions | 1.12.0-9.el8_7.1 |
| `tigervnc-license` | AlmaLinux:8 | All versions | 1.12.0-9.el8_7.1 |
| `tigervnc-selinux` | AlmaLinux:8 | All versions | 1.12.0-9.el8_7.1 |
| `tigervnc-server` | AlmaLinux:8 | All versions | 1.12.0-9.el8_7.1 |
| `tigervnc-server-minimal` | AlmaLinux:8 | All versions | 1.12.0-9.el8_7.1 |
| `tigervnc-server-module` | AlmaLinux:8 | All versions | 1.12.0-9.el8_7.1 |
| `tigervnc` | AlmaLinux:9 | All versions | 1.12.0-5.el9_1.1 |
| `tigervnc-icons` | AlmaLinux:9 | All versions | 1.12.0-5.el9_1.1 |
| `tigervnc-license` | AlmaLinux:9 | All versions | 1.12.0-5.el9_1.1 |
| `tigervnc-selinux` | AlmaLinux:9 | All versions | 1.12.0-5.el9_1.1 |
| `tigervnc-server` | AlmaLinux:9 | All versions | 1.12.0-5.el9_1.1 |
| `tigervnc-server-minimal` | AlmaLinux:9 | All versions | 1.12.0-5.el9_1.1 |
| `tigervnc-server-module` | AlmaLinux:9 | All versions | 1.12.0-5.el9_1.1 |
| `tigervnc` | Red Hat:enterprise_linux:7::client | All versions | 0:1.8.0-24.el7_9 |
| `tigervnc-debuginfo` | Red Hat:enterprise_linux:7::client | All versions | 0:1.8.0-24.el7_9 |
| `tigervnc-icons` | Red Hat:enterprise_linux:7::client | All versions | 0:1.8.0-24.el7_9 |
| `tigervnc-license` | Red Hat:enterprise_linux:7::client | All versions | 0:1.8.0-24.el7_9 |
| `tigervnc-server` | Red Hat:enterprise_linux:7::client | All versions | 0:1.8.0-24.el7_9 |
| `tigervnc-server-applet` | Red Hat:enterprise_linux:7::client | All versions | 0:1.8.0-24.el7_9 |
| `tigervnc-server-minimal` | Red Hat:enterprise_linux:7::client | All versions | 0:1.8.0-24.el7_9 |
| `tigervnc-server-module` | Red Hat:enterprise_linux:7::client | All versions | 0:1.8.0-24.el7_9 |
| `xorg-x11-server` | Red Hat:enterprise_linux:7::client | All versions | 0:1.20.4-22.el7_9 |
| `xorg-x11-server-Xdmx` | Red Hat:enterprise_linux:7::client | All versions | 0:1.20.4-22.el7_9 |
| `xorg-x11-server-Xephyr` | Red Hat:enterprise_linux:7::client | All versions | 0:1.20.4-22.el7_9 |
| `xorg-x11-server-Xnest` | Red Hat:enterprise_linux:7::client | All versions | 0:1.20.4-22.el7_9 |
| `xorg-x11-server-Xorg` | Red Hat:enterprise_linux:7::client | All versions | 0:1.20.4-22.el7_9 |
| `xorg-x11-server-Xvfb` | Red Hat:enterprise_linux:7::client | All versions | 0:1.20.4-22.el7_9 |
| `xorg-x11-server-Xwayland` | Red Hat:enterprise_linux:7::client | All versions | 0:1.20.4-22.el7_9 |
| `xorg-x11-server-common` | Red Hat:enterprise_linux:7::client | All versions | 0:1.20.4-22.el7_9 |
| `xorg-x11-server-debuginfo` | Red Hat:enterprise_linux:7::client | All versions | 0:1.20.4-22.el7_9 |
| `xorg-x11-server-devel` | Red Hat:enterprise_linux:7::client | All versions | 0:1.20.4-22.el7_9 |
| `xorg-x11-server-source` | Red Hat:enterprise_linux:7::client | All versions | 0:1.20.4-22.el7_9 |
| `tigervnc` | Red Hat:enterprise_linux:7::computenode | All versions | 0:1.8.0-24.el7_9 |
| `tigervnc-debuginfo` | Red Hat:enterprise_linux:7::computenode | All versions | 0:1.8.0-24.el7_9 |
| `tigervnc-icons` | Red Hat:enterprise_linux:7::computenode | All versions | 0:1.8.0-24.el7_9 |
| `tigervnc-server` | Red Hat:enterprise_linux:7::computenode | All versions | 0:1.8.0-24.el7_9 |
| `tigervnc-server-applet` | Red Hat:enterprise_linux:7::computenode | All versions | 0:1.8.0-24.el7_9 |
| `tigervnc-server-module` | Red Hat:enterprise_linux:7::computenode | All versions | 0:1.8.0-24.el7_9 |
| `xorg-x11-server` | Red Hat:enterprise_linux:7::computenode | All versions | 0:1.20.4-22.el7_9 |

Products: Fedoraproject Fedora, Redhat Enterprise Linux, Redhat Enterprise Linux Aus, Redhat Enterprise Linux Desktop, Redhat Enterprise Linux Eus, Redhat Enterprise Linux for Ibm Z Systems, Redhat Enterprise Linux for Ibm Z Systems Eus, Redhat Enterprise Linux for Power Big Endian, Redhat Enterprise Linux for Power Little Endian, Redhat Enterprise Linux for Power Little Endian Eus, Redhat Enterprise Linux for Scientific Computing, Redhat Enterprise Linux Server, Redhat Enterprise Linux Server Aus, Redhat Enterprise Linux Server for Power Little Endian Update Services for Sap Solutions, Redhat Enterprise Linux Server Tus, Redhat Enterprise Linux Server Update Services for Sap Solutions, Redhat Enterprise Linux Server Workstation, X.org X Server.

## How do I fix CVE-2023-0494?

Apply the vendor's patch.

## Is CVE-2023-0494 being exploited?

There is no known exploitation of CVE-2023-0494 in the wild and no public exploit code.

## Other vulnerabilities in Fedoraproject Fedora

- [CVE-2024-4577](https://insights.sbomify.com/CVE-2024-4577/): PHP-CGI OS Command Injection (critical 9.8, exploited in the wild)
- [CVE-2021-39226](https://insights.sbomify.com/CVE-2021-39226/): Grafana Authentication Bypass (critical 9.8, exploited in the wild)
- [CVE-2019-5544](https://insights.sbomify.com/CVE-2019-5544/): VMware ESXi and Horizon DaaS OpenSLP Heap-Based Buffer Overflow (critical 9.8, exploited in the wild)
- [CVE-2024-4947](https://insights.sbomify.com/CVE-2024-4947/): Google Chromium V8 Type Confusion (critical 9.6, exploited in the wild)
- [CVE-2024-4671](https://insights.sbomify.com/CVE-2024-4671/): Google Chromium Visuals Use-After-Free (critical 9.6, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-0494 and fix it if it is affected.

What it is: CVE-2023-0494 is a high-severity use after free vulnerability in Fedoraproject Fedora, published on 27 Mar 2023. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-0494 in the wild and no public exploit code.

Affected product: Fedoraproject Fedora. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-0494/ (Markdown: https://insights.sbomify.com/CVE-2023-0494/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-0494
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-0494
- OSV: https://osv.dev/vulnerability/CVE-2023-0494

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-0494/
Summaries are generated and may contain mistakes; the official description above is the record.
