GHSA-G9WW-X58F-9G6M

GHSA-G9WW-X58F-9G6M is a high-severity code injection vulnerability in github.com/edgelesssys/contrast (go), affecting versions < 1.18.0. It is fixed in 1.18.0.

Summary

BadAML

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:

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.

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.

Untrusted input is evaluated as executable code within the application's runtime environment. Typical impact: arbitrary code execution within the application's privilege context.

GHSA-G9WW-X58F-9G6M has a CVSS score of 8.4 (High). The vector is requires local access, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (1.18.0); upgrading removes the vulnerable code path.

Affected versions

github.com/edgelesssys/contrast (< 1.18.0)

Security releases

github.com/edgelesssys/contrast → 1.18.0 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

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.

Frequently Asked Questions

  1. What is GHSA-G9WW-X58F-9G6M? GHSA-G9WW-X58F-9G6M is a high-severity code injection vulnerability in github.com/edgelesssys/contrast (go), affecting versions < 1.18.0. It is fixed in 1.18.0. Untrusted input is evaluated as executable code within the application's runtime environment.
  2. How severe is GHSA-G9WW-X58F-9G6M? GHSA-G9WW-X58F-9G6M has a CVSS score of 8.4 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of github.com/edgelesssys/contrast are affected by GHSA-G9WW-X58F-9G6M? github.com/edgelesssys/contrast (go) versions < 1.18.0 is affected.
  4. Is there a fix for GHSA-G9WW-X58F-9G6M? Yes. GHSA-G9WW-X58F-9G6M is fixed in 1.18.0. Upgrade to this version or later.
  5. Is GHSA-G9WW-X58F-9G6M exploitable, and should I be worried? Whether GHSA-G9WW-X58F-9G6M is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether GHSA-G9WW-X58F-9G6M is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix GHSA-G9WW-X58F-9G6M? Upgrade github.com/edgelesssys/contrast to 1.18.0 or later.

Other vulnerabilities in github.com/edgelesssys/contrast

Stop the waste.
Protect your environment with Kodem.