MOKSHA-2026-0049: HIMN Identity Hijack + DHCP Manipulation via Network.other_config

Advisory IDMOKSHA-2026-0049
Semantic IDNOC-4
Published2026-04-24
CVSS 3.15.5 Medium
CVSS 3.1 VectorAV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:H
CVSS 4.05.1 Medium
CVSS 4.0 VectorAV:N/AC:L/AT:N/PR:H/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
XAPI ObjectNetwork
XAPI Fieldother_config:is_host_internal_management_network
Entry Rolepool-operator
ResearcherJakob Wolffhechel, Moksha

Affected Products

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

Summary

A pool-operator in XAPI-based hypervisors (XenServer, XCP-ng) can hijack the Host Internal Management Network (HIMN) identity or manipulate guest VM DHCP configuration by modifying is_host_internal_management_network, ip_begin, ip_end, and netmask keys in Network.other_config. The helpers.ml:833-846 function identifies the HIMN by searching for the is_host_internal_management_network=true key, and xapi_udhcpd.ml:271-283 uses ip_begin and ip_end to configure the DHCP range for guest VMs. Marking a second network as HIMN creates ambiguity; modifying the DHCP range enables IP exhaustion attacks or assignment of IPs outside the expected link-local range.

Vulnerability Description

Network.other_config is a Map(String, String) field writable by pool-operator. The HIMN is identified by the presence of specific keys in this field rather than through a dedicated, protected API field.

The HIMN identity mechanism:

  1. helpers.ml:833-846 defines get_special_network which calls List.find on all networks
  2. It checks is_host_internal_management_network=true in Network.other_config
  3. List.find returns the first match - if multiple networks have this key, the match is non-deterministic
  4. A pool-operator marks a second network as HIMN: Network.add_to_other_config(network, "is_host_internal_management_network", "true")
  5. XAPI's HIMN identification becomes ambiguous

The DHCP configuration path:

  1. xapi_network.ml:54 reads ip_begin from Network.other_config
  2. xapi_udhcpd.ml:271-283 reads ip_begin and ip_end to configure the DHCP range
  3. xapi_network.ml:55 reads netmask for bridge IP configuration
  4. A pool-operator modifies these keys: Network.add_to_other_config(himn, "ip_begin", "10.0.0.1")
  5. The DHCP server assigns IPs from the attacker-controlled range
  6. Guest VMs receive IPs outside the expected 169.254.x.x link-local range

The HIMN keys confirmed on a live host:

is_guest_installer_network: true
is_host_internal_management_network: true
ip_begin: 169.254.0.1
ip_end: 169.254.255.254
netmask: 255.255.0.0

Root Causes

  1. Identity via mutable metadata. The HIMN is identified by a key in Network.other_config rather than through a first-class, immutable field. Any pool-operator can create or remove HIMN identity on any network.

  2. Missing RBAC protection. Network.other_config only protects UI keys (folder, XenCenter.CustomFields.*, XenCenterCreateInProgress). All HIMN infrastructure keys are writable by pool-operator.

  3. Ambiguous identity resolution. List.find returns the first match when multiple networks claim HIMN identity. The behavior is non-deterministic and depends on database ordering.

  4. Unvalidated DHCP configuration. The ip_begin, ip_end, and netmask values are consumed with basic format validation (inet_addr_of_string) but no semantic validation. IPs outside the link-local range, overlapping ranges, or extreme ranges are accepted.

Affected Systems

Directly Affected

Indirectly Affected

Exploitation Scenarios

Scenario Impact Pre-conditions Status
HIMN identity hijack Mark a second network as HIMN, creating identity ambiguity pool-operator Source-traced
DHCP range manipulation Change IP range for guest VMs, assign IPs outside link-local pool-operator, HIMN network Source-traced
IP exhaustion Narrow the DHCP range to exhaust available addresses pool-operator, HIMN network Modeled
Guest connectivity disruption Assign non-link-local IPs, breaking guest agent communication pool-operator, HIMN network Modeled
BOC-1 chain vm-admin uses BOC-1 S3 to self-grant pool-operator, then manipulates HIMN vm-admin, BOC-1 Source-traced

Chaining Analysis

Detection

Remediation

Short-Term Mitigations

Long-Term Fix

Promote HIMN identity to a first-class field. Make HIMN identity an immutable, XAPI-managed property rather than a user-writable other_config key.

Protect HIMN keys via map_keys_roles. Add is_host_internal_management_network, is_guest_installer_network, ip_begin, ip_end, and netmask at _R_LOCAL_ROOT_ONLY in the Network field definition.

Validate DHCP range. Enforce that ip_begin and ip_end fall within the expected link-local subnet.

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