MOKSHA-2026-0028: VDI Lifecycle Corruption via VBD.other_config owner Key

Advisory IDMOKSHA-2026-0028
Semantic IDBOC-4
Published2026-04-24
CVSS 3.17.1 High
CVSS 3.1 VectorAV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
CVSS 4.08.3 High
CVSS 4.0 VectorAV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:H/SA:N
XAPI ObjectVBD
XAPI Fieldother_config:owner
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 can manipulate the owner key in VBD.other_config to cause unintended VDI deletion or prevent VDI cleanup during VM uninstall operations. The owner key is read by cli_operations.ml:4315-4318 during xe vm-uninstall to determine whether a VDI should be destroyed with its parent VM. By setting owner="" on a shared VDI's VBD, an attacker causes the uninstall operation to destroy a VDI that is still in use by other VMs - data destruction. By removing the owner key from a non-shared VBD, the attacker causes VDIs to be orphaned on uninstall - storage leak that accumulates over time. The key has no per-key RBAC protection.

Vulnerability Description

VBD.other_config is a Map(String, String) field writable by vm-admin. The owner key participates in VDI lifecycle management.

owner Key Lifecycle

XAPI sets the owner key automatically:

The key is consumed during VM uninstall:

Attack Scenarios

Scenario A - Data destruction via shared VDI:

  1. VDI X is attached to VM-A (owner=true) and VM-B (no owner key)
  2. Attacker sets owner="" on VM-B's VBD to VDI X
  3. When VM-B is uninstalled, xe vm-uninstall sees owner present and destroys VDI X
  4. VM-A loses its disk - data destruction

Scenario B - Storage leak:

  1. Attacker removes the owner key from a VBD
  2. When the VM is uninstalled, the associated VDI is not destroyed
  3. The VDI becomes orphaned - consuming storage indefinitely
  4. Repeated over many VMs, this causes gradual storage exhaustion

Root Causes

  1. Missing RBAC protection. VBD.other_config has zero map_keys_roles entries for the owner key. Any vm-admin can modify it.

  2. Presence-based check. The consumption logic checks for key presence, not key value. An empty string owner="" triggers the same behavior as owner=true.

  3. No provenance verification. The consumer (cli_operations.ml) does not verify whether the owner key was set by a trusted internal XAPI operation or injected by an external API caller.

Affected Systems

Directly Affected

Indirectly Affected

Exploitation Scenarios

Scenario Impact Pre-conditions Status
Shared VDI destruction Data loss when VM is uninstalled - shared VDI destroyed vm-admin, shared VDI with multiple VBDs Source-traced
Storage leak Orphaned VDIs accumulate, causing gradual storage exhaustion vm-admin, repeated VM lifecycle Source-traced
Targeted data destruction Destroy a specific VDI by manipulating its VBD owner key vm-admin, knowledge of VDI-VBD relationship Modeled

Detection

Remediation

Short-Term Mitigations

Long-Term Fix

Validation at consumption point. cli_operations.ml:4315-4318 should verify that the owner key was set by a trusted internal XAPI operation (VBD creation, VM clone) rather than accepting any value. This requires a provenance mechanism to distinguish internal writes from external API writes.

Note: The owner key is intentionally excluded from simple map_keys_roles protection because XAPI sets it automatically during VBD creation and VM clone. Restricting it via map_keys_roles would break these internal flows. The fix requires consumer-side validation rather than write-time RBAC.

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