MOKSHA-2026-0057: FIST Namespace Exposure via VM.xenstore_data

Advisory IDMOKSHA-2026-0057
Semantic IDXSD-2
Published2026-04-24
CVSS 3.15.3 Medium
CVSS 3.1 VectorAV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N
CVSS 4.05.3 Medium
CVSS 4.0 VectorAV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
XAPI ObjectVM
XAPI Fieldxenstore_data:FIST/*
Entry Rolevm-admin
ResearcherJakob Wolffhechel, Moksha

Affected Products

VendorProductVersions
Citrix / Cloud Software GroupXenServer / Citrix Hypervisorall versions (shared XAPI codebase)
VatesXCP-ng8.3.0

Summary

A vm-admin in XAPI-based hypervisors (XenServer, XCP-ng) can inject FIST/-prefixed keys into VM.xenstore_data, polluting the Fault Injection Service Testing (FIST) namespace. The FIST prefix is included in allowed_xsdata_prefixes at domain.ml:164, allowing keys starting with FIST/ to pass through the xenopsd filter and be written to guest xenstore. While XAPI's actual fault injection mechanism reads /tmp/fist_* files on disk (not xenstore entries), the namespace pollution persists in the XAPI database across VM restarts, is visible to all API consumers, and establishes a pre-positioned injection path if any future code adds xenstore-based FIST consumption. The field has zero map_keys_roles entries.

Vulnerability Description

VM.xenstore_data is a Map(String, String) field writable by vm-admin with zero per-key RBAC. The only security control is a prefix filter in xenopsd at domain.ml:164-170 that accepts keys starting with vm-data/ or FIST/.

The code path:

  1. vm-admin writes a FIST-prefixed key: VM.add_to_xenstore_data(vm, "FIST/disable_reboot", "1")
  2. XAPI stores the value in the database immediately with zero validation (message_forwarding.ml:2092-2099)
  3. The key passes the filtered_xsdata prefix check at domain.ml:164-170 because FIST is in allowed_xsdata_prefixes
  4. The key is written to guest xenstore at /local/domain/<domid>/FIST/disable_reboot
  5. On VM restart, the FIST key is rewritten to the new domain's xenstore from the database

The FIST namespace in xenstore is not connected to XAPI's actual fault injection mechanism (xapi_fist.ml), which checks for /tmp/fist_* files on disk. The two mechanisms share a namespace but are not linked. The xenstore path is a data passthrough only.

The security concerns:

Root Causes

  1. Debug namespace exposed to unprivileged users. The FIST/ prefix is included in allowed_xsdata_prefixes alongside vm-data/, granting vm-admin write access to a debugging namespace.

  2. Missing RBAC protection. VM.xenstore_data has zero map_keys_roles entries. No key prefix is restricted to a higher privilege level.

  3. Persistent data injection. FIST keys written to VM.xenstore_data persist in the XAPI database and are rewritten to xenstore on every VM boot, creating a persistent namespace pollution vector.

  4. No namespace separation. The xenstore FIST namespace and the file-based FIST mechanism share the same name without any connection, creating confusion about whether xenstore FIST entries have operational effects.

Affected Systems

Directly Affected

Indirectly Affected

Exploitation Scenarios

Scenario Impact Pre-conditions Status
Namespace pollution Inject persistent FIST-prefixed data visible to all API consumers vm-admin Source-traced
Future attack surface Pre-position FIST entries for exploitation if xenstore-based FIST consumption is added vm-admin Modeled
Guest-side injection Guest writes FIST keys to vm-data; bidirectional sync propagates them to XAPI DB Guest domain, bidirectional sync (XSD-3) Live-tested
BOC-1 chain vm-admin uses BOC-1 S3 to bulk-inject FIST keys across all VMs vm-admin, BOC-1 Source-traced

Chaining Analysis

Detection

Remediation

Short-Term Mitigations

Long-Term Fix

Remove FIST from allowed_xsdata_prefixes. The FIST/ prefix serves no legitimate user purpose and should be removed from allowed_xsdata_prefixes at domain.ml:164. If developer testing requires FIST in xenstore, restrict it to _R_LOCAL_ROOT_ONLY via map_keys_roles.

Add map_keys_roles protection. Restrict FIST/* keys to _R_LOCAL_ROOT_ONLY in the VM.xenstore_data field definition.

Upstream patches exist. They are held privately pending coordinated disclosure.

Disclosure

Disclosure:

References

Credits

Discovered and reported by Jakob Wolffhechel, Moksha.

Jakob Wolffhechel · Moksha · Copenhagen
jakob@wolffhechel.dk · +45 3170 7337
Published 2026-04-24 08:00 CEST · cna.moksha.dk · shittrix.moksha.dk