MOKSHA-2026-0085: Feature Restriction Bypass via Host.license_params restrict_* Keys

Advisory IDMOKSHA-2026-0085
Semantic IDLPC-1
Published2026-04-24
CVSS 3.12.3 Low
CVSS 3.1 VectorAV:L/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:N
CVSS 4.04.6 Medium
CVSS 4.0 VectorAV:L/AC:L/AT:N/PR:H/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
XAPI ObjectHost
XAPI Fieldlicense_params:restrict_*
Entry Rolelocal root (not accessible via XAPI network API)
ResearcherJakob Wolffhechel, Moksha

Affected Products

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

Summary

An attacker with root access on an XAPI-based hypervisor host (XenServer, XCP-ng) can modify the XAPI database to set all restrict_* keys in Host.license_params to "false", enabling licensed features (GPU passthrough, dynamic memory control, workload balancing) without a valid license. The Host.license_params field has the strongest access control in the XAPI RBAC system: _R_LOCAL_ROOT_ONLY with pool_internal:true and DynamicRO qualifier. The setter is not exposed via the external API. This is a license compliance issue, not a traditional security vulnerability - an attacker with root access already has full system control. The finding is included for completeness as part of the systematic XAPI map field audit.

Vulnerability Description

Host.license_params is a Map(String, String) field defined at datamodel_host.ml:3055-3059 with DynamicRO qualifier. The set_license_params method at datamodel_host.ml:2047-2067 is marked pool_internal:true, hide_from_docs:true, and allowed_roles:_R_LOCAL_ROOT_ONLY. This is the most restrictive access level in XAPI.

The restrict_* keys are consumed by the pool features system:

Host.license_params:restrict_* values
    |
    v
pool_features_helpers.ml:42-51 reads restrict_* keys from all hosts
    |
    v
pool_features_helpers.ml:75-107 computes intersection of features
    |
    v
Pool.restrictions updated with pool-level feature flags
    |
    v
pool_features.ml:28-30 checks features before operations
    |
    v
Feature-gated operations allowed/denied

An attacker who has obtained root access on the host can modify license_params values directly in the XAPI database on disk. Setting restrict_dmc=false, restrict_gpu=false, restrict_wlb=false (and other restrict_* keys) enables the corresponding features at the pool level after the next update_pool_features cycle.

Live host verification confirms the field is not accessible via the external API: attempts to write via xe CLI or XAPI session return "Internal API call attempted with non-pool session".

Root Causes

  1. No value validation in setter. The set_license_params method accepts any map content without validating that restrict_* keys contain only "true" or "false".

  2. No integrity verification. XAPI does not verify that license_params data was produced by the legitimate v6d license daemon. Direct database modification is indistinguishable from daemon-written values.

  3. Root access prerequisite. The sole attack path requires local root on the host, which already grants full system control. License enforcement is redundant at that privilege level.

Affected Systems

Directly Affected

Indirectly Affected

Exploitation Scenarios

Scenario Impact Pre-conditions Status
Feature unlock via DB modification Licensed features enabled without license Local root on host Source-traced (theoretical)
BOC-1 chain vm-admin gains root via BOC-1, modifies license_params on disk vm-admin, BOC-1 Source-traced

Chaining Analysis

Detection

Remediation

Current State (Adequate)

The current security posture is adequate for the threat model:

  1. Write access is maximally restricted (_R_LOCAL_ROOT_ONLY + pool_internal)
  2. The field is DynamicRO - no auto-generated map mutation methods
  3. Values are computed internally by the v6d license daemon

Optional Hardening

Add value validation. Validate that restrict_* keys contain only "true" or "false" in set_license_params.

Add integrity verification. Sign license_params data so XAPI can verify it was produced by the legitimate v6d daemon. This is defense-in-depth against direct database modification.

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