MOKSHA-2026-0052: Leaked VBD Detection Spoofing via task_id/related_to

Advisory IDMOKSHA-2026-0052
Semantic IDBOC-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 ObjectVBD
XAPI Fieldother_config:task_id, other_config:related_to
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 spoof the task_id and related_to keys in VBD.other_config to evade leaked VBD detection. These keys are used internally by XAPI to track which task created a VBD and which control domain it belongs to. By injecting false values, an attacker can make malicious VBDs (including those created via BOC-1) appear as legitimate control-domain VBDs, causing the cleanup subsystem to skip them. VBD.other_config has zero map_keys_roles entries - no key is protected at the RBAC level.

Vulnerability Description

VBD.other_config is a Map(String, String) field writable by vm-admin with zero per-key RBAC protection. The task_id and related_to keys are XAPI-internal metadata used for VBD lifecycle tracking.

The code path:

  1. When XAPI creates a VBD internally, it sets task_id to the creating task's OpaqueRef and related_to to the associated VM or control domain reference
  2. The VBD leak detector uses these keys to determine whether a VBD is an orphaned artifact or a legitimate control-domain attachment
  3. A vm-admin sets these keys on a malicious VBD: VBD.add_to_other_config(vbd, "task_id", "<valid_task_ref>") and VBD.add_to_other_config(vbd, "related_to", "<control_domain_ref>")
  4. The leak detector reads the spoofed values and classifies the VBD as legitimate
  5. The malicious VBD persists undetected

No validation occurs. XAPI does not verify that the task_id corresponds to an actual task or that related_to points to a real control domain.

Root Causes

  1. Missing RBAC protection. VBD.other_config has zero map_keys_roles entries in datamodel.ml. The task_id and related_to keys are writable by vm-admin via add_to_other_config.

  2. No reference validation. XAPI does not verify that the task_id value corresponds to a real task or that related_to points to an existing control domain. OpaqueRef strings are accepted without validation.

  3. Security-relevant metadata in user-writable field. Internal tracking data (task_id, related_to) is stored in a field accessible to delegated administrators rather than in a protected internal field.

  4. set_other_config RBAC bypass. The set_other_config method replaces the entire map atomically and bypasses map_keys_roles per-key checks entirely.

Affected Systems

Directly Affected

Indirectly Affected

Exploitation Scenarios

Scenario Impact Pre-conditions Status
Leak detection evasion Spoofed task_id/related_to causes cleanup to skip malicious VBD vm-admin Source-traced
BOC-1 persistence After exploiting BOC-1 (backend-local mount), spoof tracking keys to avoid detection vm-admin, BOC-1 VBD Source-traced
Audit trail spoofing Forge task_id to attribute VBD creation to a different task or administrator vm-admin Source-traced

Chaining Analysis

Detection

Remediation

Short-Term Mitigations

Long-Term Fix

Add map_keys_roles protection. Restrict task_id and related_to to _R_POOL_ADMIN in the VBD field definition in datamodel.ml.

Validate references. When task_id or related_to is set, verify that the OpaqueRef corresponds to a real object in the database.

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