Safeguard
Vulnerability Analysis•

CVE-2023-34325: High Stack Overflow in Xen libfsimage and pygrub

Xen libfsimage, used by pygrub, has a stack overflow risk when reading guest disks (XSA-443), scored 7.8 High. Apply the patches or stop using pygrub.

Safeguard Security Team
3 min read

CVE-2023-34325 covers memory safety problems in Xen's libfsimage, which pygrub uses to read guest disks, tracked as XSA-443 and scored 7.8 High. A guest may escalate to host control. The advisory offers patches and says to stop using pygrub or restrict it.

What's affected

Per XSA-443, all Xen versions are affected. libfsimage holds parsing code for several filesystems, most of it derived from grub legacy, and pygrub uses it to inspect guest disks. Pygrub runs as the same user as the toolstack, which is root in a privileged domain.

The advisory says at least one stack buffer overflow was reported, and that the Xen Security Team is no longer confident libfsimage is suitable for guest controlled input with superuser privileges. The upstream grub issue is CVE-2023-4949, a flaw in grub legacy's XFS handling. CVE-2023-34325 refers specifically to Xen's copy of libfsimage. Patches exist for xen-unstable and the 4.15, 4.16 and 4.17 branches. The stable branch patches may not apply cleanly to the latest release tarball.

How to check if you're exposed

Find out whether you use pygrub at all. Search your guest configuration files for the bootloader setting:

grep -r bootloader /etc/xen/

If any guest uses pygrub as its bootloader, it is in scope, and the filesystem inside that guest's disk is parsed by libfsimage as root. Also check your Xen version with xl info and your vendor's bulletin for the XSA-443 patches.

Guests that boot as HVM do not use pygrub, which the advisory lists as a mitigation: run only HVM guests.

What to do now

  1. Apply the XSA-443 patches. Patches 1 to 4 fix the XFS stack overflow in libfsimage.
  2. Apply patches 5 to 11 to let pygrub run as a restricted user, then set the bootloader_restrict option described in the xl.cfg man page.
  3. Where you cannot patch, stop using pygrub for guests, as the advisory advises.
  4. For 64-bit PV guests that use grub2, switch to pvgrub, another option the advisory lists.
  5. Only host guest disks you trust, or move guests to HVM mode.

Why it matters

The root issue is that a privileged tool parses a filesystem controlled by the guest. If a guest owner can craft a disk that corrupts memory in the parser, they gain the rights of the toolstack, which is typically root on the host.

The Xen team chose to ship a way to run pygrub with fewer privileges rather than rely on fixing parsing bugs one by one. That is a sound lesson for any system that parses untrusted structures with high privilege: reduce the privilege, not only the bugs.

The weakness classes involved are CWE-787 (Out-of-bounds Write). The record does not flag this CVE as listed in CISA's Known Exploited Vulnerabilities catalog, and none of the advisories I read says it is exploited in the wild. That can change, so treat the status as a snapshot.

The record scores this CVE 7.8 High. The Xen advisory gives no CVSS score and names no fixed release, only patches. The advisory header and body differ on one upstream CVE number (CVE-2022-4949 versus CVE-2023-4949), so verify against upstream.

Quick check

Does this affect HVM guests?

The advisory lists running only HVM guests as a mitigation, because pygrub is used for PV style boot.

What is bootloader_restrict?

An option in xl.cfg that runs pygrub as a restricted user. The patches in the advisory add it.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

We email you a link to confirm, and only then add you to the list. Unsubscribe in one click. Privacy

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.