CVE-2024-31144 Xapi: Metadata injection attack against backup/restore functionality
A malicious guest VM can spoof metadata backups to achieve privilege escalation or code execution on the Xen host during restore operations.
- 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
What is CVE-2024-31144?
CVE-2024-31144 is a low-severity unsafe deserialization vulnerability in Xen, published on 14 Feb 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
For a brief summary of Xapi terminology, see:
https://xapi-project.github.io/xen-api/overview.html#object-model-overview
Xapi contains functionality to backup and restore metadata about Virtual Machines and Storage Repositories (SRs).
The metadata itself is stored in a Virtual Disk Image (VDI) inside an SR. This is used for two purposes; a general backup of metadata (e.g. to recover from a host failure if the filer is still good), and Portable SRs (e.g. using an external hard drive to move VMs to another host).
Metadata is only restored as an explicit administrator action, but occurs in cases where the host has no information about the SR, and must locate the metadata VDI in order to retrieve the metadata.
The metadata VDI is located by searching (in UUID alphanumeric order) each VDI, mounting it, and seeing if there is a suitable metadata file present. The first matching VDI is deemed to be the metadata VDI, and is restored from.
In the general case, the content of VDIs are controlled by the VM owner, and should not be trusted by the host administrator.
A malicious guest can manipulate its disk to appear to be a metadata backup.
A guest cannot choose the UUIDs of its VDIs, but a guest with one disk has a 50% chance of sorting ahead of the legitimate metadata backup. A guest with two disks has a 75% chance, etc.
Weakness: CWE-829
Which versions are affected by CVE-2024-31144?
It affects 1 product.
Products include Xen Xapi.
How do I fix CVE-2024-31144?
Apply the vendor's patch.
Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.
Is CVE-2024-31144 being exploited?
There is no known exploitation of CVE-2024-31144 in the wild and no public exploit code.
Other vulnerabilities in Xen
Sources
Also known as GHSA-fg38-pgj3-5w5f, UBUNTU-CVE-2024-31144.