MOKSHA-2026-0035: iSCSI Initiator Identity Spoofing via Host.other_config iscsi_iqn

Advisory IDMOKSHA-2026-0035
Semantic IDHOC-2
Published2026-04-24
CVSS 3.16.8 Medium
CVSS 3.1 VectorAV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N
CVSS 4.06.9 Medium
CVSS 4.0 VectorAV:N/AC:L/AT:N/PR:H/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N
XAPI ObjectHost
XAPI Fieldother_config:iscsi_iqn
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 overwrite the host's iSCSI initiator identity by setting Host.other_config:iscsi_iqn to an arbitrary IQN string. The XAPI event watcher thread (xapi_host_helpers.ml:584-595) syncs this value to /etc/iscsi/initiatorname.iscsi without format validation. All subsequent iSCSI operations use the spoofed initiator name. If storage targets use IQN-based access control lists - the standard access control mechanism for enterprise iSCSI deployments - the attacker gains unauthorized access to LUNs belonging to other hosts or tenants. This directly amplifies SMC-1: the attacker controls both the initiator identity (HOC-2) and the target parameters (SMC-1).

Vulnerability Description

Host.other_config is a Map(String, String) field writable by pool-operator. The iscsi_iqn key is consumed by the XAPI event watcher thread, which writes the value directly to the host's iSCSI initiator name file.

The code path:

  1. pool-operator calls Host.add_to_other_config(host, "iscsi_iqn", "iqn.2001-01.com.victim:storage1")
  2. The XAPI event watcher thread detects the change (xapi_host_helpers.ml:584-595)
  3. The value is written to /etc/iscsi/initiatorname.iscsi without validation
  4. All subsequent iSCSI discovery and login operations use the spoofed IQN
  5. Storage arrays that rely on IQN-based ACLs grant access based on the spoofed identity

No format validation is performed. The value is not checked against RFC 3720 IQN format. Arbitrary strings are accepted.

Root Causes

  1. Missing RBAC protection. Host.other_config has zero map_keys_roles entries for iscsi_iqn. The key inherits the class default _R_POOL_OP.

  2. Missing format validation. The IQN value is not validated against RFC 3720 format. Any string is accepted and written to the initiator name file.

  3. Host identity file as writable config. The iSCSI initiator name file (/etc/iscsi/initiatorname.iscsi) is the host's identity in all iSCSI protocol interactions. It should not be modifiable through a user-writable map field.

  4. Scope change to storage network. The spoofed IQN affects resources outside the hypervisor trust boundary - specifically, storage array ACLs and LUN mappings.

Affected Systems

Directly Affected

Indirectly Affected

Exploitation Scenarios

Scenario Impact Pre-conditions Status
Initiator identity spoofing Host impersonates another iSCSI initiator, bypassing storage ACLs pool-operator, iSCSI SR connected Confirmed (iscsi_iqn write verified on live host)
Cross-tenant LUN access Attacker accesses LUNs authorized for other hosts/tenants via spoofed IQN pool-operator, multi-tenant iSCSI SAN with IQN-based ACLs Modeled
SMC-1 amplification Attacker controls both initiator identity (HOC-2) and target parameters (SMC-1) pool-operator, iSCSI SR Source-traced
Audit trail corruption Storage array logs show spoofed initiator, masking the actual attacker pool-operator, iSCSI SR with access logging Modeled

Chaining Analysis

HOC-2 chains with BOC-1 and SMC-1:

Detection

Remediation

Short-Term Mitigations

Long-Term Fix

Validate IQN format. Enforce RFC 3720 IQN format validation at write time. Reject values that do not conform to the iqn.YYYY-MM.domain:identifier pattern.

Add map_keys_roles. Protect iscsi_iqn in datamodel_host.ml at _R_POOL_ADMIN to prevent pool-operator from modifying the host's iSCSI identity.

Immutable host identity. The iSCSI initiator name should be set once during host installation and not modifiable through the API without explicit pool-admin authorization.

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