MOKSHA-2026-0084: Firmware Type Denial of Service via VM.HVM_boot_params firmware

Advisory IDMOKSHA-2026-0084
Semantic IDHBP-2
Published2026-04-24
CVSS 3.13.1 Low
CVSS 3.1 VectorAV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/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 ObjectVM
XAPI FieldHVM_boot_params:firmware
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 disrupt VM boot by writing an invalid value to VM.HVM_boot_params:firmware or by removing the firmware key entirely. The firmware key is validated at VM start time (not at write time) by firmware_of_vm at xapi_xenops.ml:255-268, which pattern-matches against exactly "bios" and "uefi". Invalid values raise Server_error, preventing VM start. Removing the key causes fallback to BIOS firmware, which renders UEFI-installed operating systems unbootable. The impact is limited because the vm-admin role already has VM.hard_shutdown capability, making denial of service redundant with existing privileges. The VM.HVM_boot_params field has zero map_keys_roles entries.

Vulnerability Description

VM.HVM_boot_params is a Map(String, String) field defined at datamodel_vm.ml:55-58 with zero map_keys_roles entries.

The firmware key is consumed at VM start time:

let firmware_of_vm vm =
  match List.assoc "firmware" vm.API.vM_HVM_boot_params with
  | "bios" -> Bios
  | "uefi" -> Uefi (nvram_uefi_of_vm vm)
  | bad -> raise Api_errors.(Server_error (invalid_value, ["HVM-boot-params['firmware']"; bad]))
  | exception Not_found -> default_firmware

This is the strongest start-time validation of any infrastructure key observed in the audit. The firmware value is pattern-matched against exactly two valid strings. Any other value produces a Server_error at VM start. If the key is missing, default_firmware (Bios) is used as a fallback.

The vulnerability arises from the gap between write-time (no validation) and start-time (robust validation):

  1. A vm-admin writes firmware=invalid - XAPI accepts and stores it without error
  2. The next VM start attempt fails with Server_error
  3. Alternatively, removing the firmware key causes BIOS fallback, which breaks UEFI guest OSes

The invalid value persists in the database until manually corrected by an administrator.

Root Causes

  1. Missing write-time validation. XAPI accepts any value for the firmware key when written. Validation occurs only at VM start time.

  2. Missing RBAC protection. VM.HVM_boot_params has zero map_keys_roles entries. The firmware key is writable by vm-admin.

  3. Persistent invalid state. The invalid firmware value remains in the database after the VM start failure, requiring manual cleanup.

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

Affected Systems

Directly Affected

Indirectly Affected

Exploitation Scenarios

Scenario Impact Pre-conditions Status
Invalid firmware value VM start fails with Server_error vm-admin Live-tested (key injection confirmed)
Firmware key removal UEFI VM falls back to BIOS, OS cannot boot vm-admin, UEFI-installed guest Source-traced
BOC-1 chain vm-admin corrupts firmware settings across all VMs via RBAC collapse vm-admin, BOC-1 Source-traced

Chaining Analysis

Detection

Remediation

Short-Term Mitigations

Long-Term Fix

Add write-time validation. Validate the firmware value against {"bios", "uefi"} at write time in addition to start time. Reject invalid values immediately.

Add map_keys_roles protection. Restrict the firmware key to _R_POOL_ADMIN in datamodel_vm.ml.

Replace with typed field. The firmware key has exactly two valid values. It should be an enumeration field, not a string in a map.

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