GHSA-G9WW-X58F-9G6M
Vulnerability from github – Published: 2026-03-26 19:49 – Updated: 2026-03-26 19:49BadAML
BadAML is an AML injection attack that exploits the ACPI interface and allows arbitrary code execution in a confidential VM. The attack was first published in 2024:
- https://blackhat.com/eu-24/briefings/schedule/#aml-injection-attacks-on-confidential-vms-42723
- https://dl.acm.org/doi/pdf/10.1145/3719027.3765123
Impact
An attacker with control over the host (which is assumed in the attacker model of Contrast) can execute malicious AML code to gain arbitrary code execution within the confidential guest.
AML is byte code embedded in ACPI tables that are passed from the host (QEMU) to the guest firmware (OVMF), and then passed from OVMF to the Linux kernel. The Linux kernel has an interpreter that executes the AML code. An attacker can craft a table with malicious AML code and the kernel will execute it. AML is Turing-complete and the interpreter has access to the full guest memory, including private pages.
See the paper for a detailed description and background of the attack.
Note that this is not a vulnerability specific to Contrast, but rather a generic vulnerability in Confidential Computing setups that use the ACPI interface.
Affected platforms
This issue affects the SNP platforms supported by Contrast: Metal-QEMU-SNP and Metal-QEMU-SNP-GPU.
Users on these platforms should switch to the fixed Contrast version immediately.
Metal-QEMU-TDX isn't affected, as the content of the ACPI tables is covered by the runtime measurements (measured into RTMR 0 by OVMF) on Intel TDX.
Patches
A sandbox similar to the one proposed in the paper has been implemented in the Linux kernel used by Contrast. The sandbox denies access to private memory pages by doing a page table lookup on every read/write by the AML interpreter.
This mitigates the attack completely: While an attacker can still run AML code, the code cannot read or modify private memory pages. Shared pages are readable/writable by the host hypervisor anyway.
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/edgelesssys/contrast"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.18.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2026-03-26T19:49:27Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "# BadAML\n\nBadAML is an AML injection attack that exploits the ACPI interface and allows arbitrary code execution in a confidential VM. The attack was first published in 2024:\n\n- \u003chttps://blackhat.com/eu-24/briefings/schedule/#aml-injection-attacks-on-confidential-vms-42723\u003e\n- \u003chttps://dl.acm.org/doi/pdf/10.1145/3719027.3765123\u003e\n\n## Impact\n\nAn attacker with control over the host (which is assumed in the attacker model of Contrast) can execute malicious AML code to gain arbitrary code execution within the confidential guest.\n\nAML is byte code embedded in ACPI tables that are passed from the host (QEMU) to the guest firmware (OVMF), and then passed from OVMF to the Linux kernel. The Linux kernel has an interpreter that executes the AML code. An attacker can craft a table with malicious AML code and the kernel will execute it. AML is Turing-complete and the interpreter has access to the full guest memory, including private pages.\n\nSee the [paper](https://dl.acm.org/doi/pdf/10.1145/3719027.3765123) for a detailed description and background of the attack.\n\nNote that this is not a vulnerability specific to Contrast, but rather a generic vulnerability in Confidential Computing setups that use the ACPI interface.\n\n## Affected platforms\n\nThis issue affects the SNP platforms supported by Contrast: `Metal-QEMU-SNP` and `Metal-QEMU-SNP-GPU`.\nUsers on these platforms should switch to the fixed Contrast version immediately.\n\n`Metal-QEMU-TDX` isn\u0027t affected, as the content of the ACPI tables is covered by the runtime measurements (measured into RTMR 0 by OVMF) on Intel TDX.\n\n## Patches\n\nA sandbox similar to the one proposed in the paper has been implemented in the Linux kernel used by Contrast. The sandbox denies access to private memory pages by doing a page table lookup on every read/write by the AML interpreter.\n\nThis mitigates the attack completely: While an attacker can still run AML code, the code cannot read or modify private memory pages. Shared pages are readable/writable by the host hypervisor anyway.",
"id": "GHSA-g9ww-x58f-9g6m",
"modified": "2026-03-26T19:49:27Z",
"published": "2026-03-26T19:49:27Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/edgelesssys/contrast/security/advisories/GHSA-g9ww-x58f-9g6m"
},
{
"type": "WEB",
"url": "https://blackhat.com/eu-24/briefings/schedule/#aml-injection-attacks-on-confidential-vms-42723"
},
{
"type": "WEB",
"url": "https://dl.acm.org/doi/pdf/10.1145/3719027.3765123"
},
{
"type": "PACKAGE",
"url": "https://github.com/edgelesssys/contrast"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "Contrast BadAML injection allows arbitrary code execution"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.