MOKSHA-2026-0047: DNS Search Domain Injection via PIF.other_config domain

Advisory IDMOKSHA-2026-0047
Semantic IDPOC-5
Published2026-04-24
CVSS 3.16.1 Medium
CVSS 3.1 VectorAV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N
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 ObjectPIF
XAPI Fieldother_config:domain
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 inject arbitrary DNS search domains into the host's resolver configuration by writing to PIF.other_config:domain. The nm.ml:655-659 function reads this key, splits it on commas, and passes the resulting domain list directly to xcp-networkd for inclusion in the host's DNS search path. No validation is performed on domain names. Injected search domains cause unqualified hostname lookups to resolve through attacker-controlled domains, enabling DNS hijack of internal service discovery.

Vulnerability Description

PIF.other_config is a Map(String, String) field writable by pool-operator with zero map_keys_roles entries. The domain key controls the DNS search domain list for the host.

The code path:

  1. pool-operator calls PIF.add_to_other_config(pif, "domain", "evil.com,attacker.net")
  2. On PIF plug or bring_pif_up, nm.ml:655-659 reads the domain key
  3. The value is split on commas to produce a list of search domains
  4. No validation is performed on domain names - any string is accepted
  5. The domains are passed to xcp-networkd, which writes them to /etc/resolv.conf
  6. Host DNS resolver uses the injected search domains for unqualified lookups
  7. ldap resolves to ldap.evil.com; ntp resolves to ntp.evil.com

PIF.other_config has the highest merge precedence in the other_config merge chain (nm.ml:112-120). DNS search domains set at the PIF level override pool-wide and network-level settings.

Root Causes

  1. Missing input validation. The nm.ml:655-659 function accepts any comma-separated string as DNS search domains. No validation against RFC 1035 domain name format is performed.

  2. Missing RBAC protection. PIF.other_config has zero map_keys_roles entries. The domain key is writable by any pool-operator.

  3. Scope change. DNS search domain injection on the host affects all services that perform unqualified DNS lookups - including storage (iSCSI by name), authentication (LDAP/AD), time synchronization (NTP), and management tools. The impact crosses the hypervisor trust boundary into infrastructure services.

  4. No logging of DNS configuration changes. No security-level log event is generated when DNS search domains are modified.

Affected Systems

Directly Affected

Indirectly Affected

Exploitation Scenarios

Scenario Impact Pre-conditions Status
Internal service hijack Unqualified ldap, smtp, ntp lookups resolve to attacker domains pool-operator Source-traced
Credential interception LDAP/AD authentication to attacker-controlled server, credential capture pool-operator, AD-joined environment Modeled
Storage redirection iSCSI targets by hostname resolve to attacker IP, storage operations redirected pool-operator, hostname-based iSCSI Modeled
BOC-1 chain vm-admin uses BOC-1 S3 to self-grant pool-operator, then injects DNS search domains vm-admin, BOC-1 Source-traced

Chaining Analysis

Detection

Remediation

Short-Term Mitigations

Long-Term Fix

Validate DNS search domains. Enforce RFC 1035 domain name format validation on the domain key at write time.

Add map_keys_roles. Protect the domain key at _R_POOL_ADMIN in the PIF field definition.

Use FQDN for internal services. Reduce reliance on search domains for service discovery.

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