CVE-2025-58151 varstored: TOCTOU issues with mapped guest memory
A time-of-check time-of-use race condition in Xen's varstored allows attackers to control jump table indices, potentially leading to code execution.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2025-58151?
CVE-2025-58151 is a critical vulnerability in Xen varstored, published on 9 Jul 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
varstored is a component of the Xapi toolstack handling UEFI Variables for a VM. It has a communication path with OVMF inside the VM involving mapping a buffer prepared by OVMF.
Within varstored, there were insufficient compiler barriers, creating TOCTOU issues with data in the shared buffer.
The exact vulnerable behaviour depends on the code generated by the compiler. In a build of varstored using default settings, the attacker can control an index used in a jump table.
Weakness: CWE-367
Which versions are affected by CVE-2025-58151?
How do I fix CVE-2025-58151?
No fix has been published for CVE-2025-58151 yet. Limit exposure of the affected software until one is available.
Is CVE-2025-58151 being exploited?
There is no known exploitation of CVE-2025-58151 in the wild and no public exploit code.
Sources
Also known as GHSA-78gx-8v3c-jqwc.