MOKSHA-2026-0059: Multi-Tenant Trust Confusion via VM.xenstore_data

Advisory IDMOKSHA-2026-0059
Semantic IDXSD-5
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:vm-data/*
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 vm-data/* keys into VM.xenstore_data that modify guest behavior across trust boundaries in delegated VM administration environments. The injected keys are written to guest xenstore at /local/domain/<domid>/vm-data/ with read-write permissions for the guest domain (domain.ml:604-624). Guest operating systems and agents treat all data under vm-data/ as trusted hypervisor-provided configuration - there is no mechanism for the guest to distinguish legitimate hypervisor data from vm-admin-injected data. This enables supply chain attacks via installation source redirection, configuration endpoint hijacking, and credential injection.

Vulnerability Description

VM.xenstore_data is a Map(String, String) field writable by vm-admin with zero per-key RBAC. In multi-tenant XAPI deployments, the vm-admin role is delegated to tenant administrators who manage a subset of VMs. The vm-data/ xenstore namespace is designed as a hypervisor-to-guest communication channel.

The trust confusion:

  1. vm-admin writes attacker-controlled configuration: VM.add_to_xenstore_data(vm, "vm-data/install/repo", "evil.example.com")
  2. XAPI stores the value with zero validation (message_forwarding.ml:2092-2099)
  3. The key passes the filtered_xsdata prefix check at domain.ml:164-170
  4. The key is written to guest xenstore at /local/domain/<domid>/vm-data/install/repo
  5. Guest OS installer reads the hypervisor-provided installation source
  6. Guest installs software from attacker-controlled repository

The guest has no cryptographic or structural mechanism to verify the provenance of vm-data/* keys. The hypervisor provides no signing, no source attribution, and no access control metadata. From the guest's perspective, all vm-data/ entries are equally trusted.

Root Causes

  1. No trust boundary in xenstore. The vm-data/ namespace is a flat, unauthenticated communication channel. The guest cannot distinguish between keys set by a pool administrator, a delegated vm-admin, or the hypervisor itself.

  2. Missing RBAC protection. VM.xenstore_data has zero map_keys_roles entries. A delegated vm-admin has the same write access to vm-data/ as a pool administrator.

  3. Delegated administration assumption. The XAPI RBAC model assumes that vm-admin is a trusted role for VM management. In multi-tenant environments, vm-admin is a tenant-level role that should not have unrestricted write access to guest configuration channels.

  4. No write-time validation. XAPI accepts any key name and value for vm-data/* keys without format, length, or content validation.

Affected Systems

Directly Affected

Indirectly Affected

Exploitation Scenarios

Scenario Impact Pre-conditions Status
Installation source redirection Guest installs from attacker-controlled repository vm-admin, guest OS install Source-traced
Configuration endpoint hijacking Guest agent connects to attacker-controlled management server vm-admin, guest agent using vm-data Modeled
Credential injection Inject SSH keys or credentials via vm-data for guest consumption vm-admin, guest reads credentials from vm-data Modeled
Cross-tenant poisoning Delegated admin poisons vm-data on VMs managed by another tenant (via set_xenstore_data) vm-admin, multi-tenant pool Source-traced
BOC-1 chain vm-admin uses BOC-1 S3 to inject malicious vm-data across all VMs in the pool vm-admin, BOC-1 Source-traced

Chaining Analysis

Detection

Remediation

Short-Term Mitigations

Long-Term Fix

Add map_keys_roles protection. Restrict sensitive vm-data/* key prefixes (installation sources, configuration endpoints) to _R_POOL_ADMIN.

Add provenance metadata. Include source attribution (session, role, timestamp) for xenstore data so guests can verify the trust level of injected configuration.

Separate tenant namespaces. In multi-tenant environments, partition vm-data/ by tenant so delegated administrators can only write to their own namespace.

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