GHSA-g9ww-x58f-9g6m: Github.com/edgelesssys/contrast Contrast BadAML Injection Allows Arbitrary Vulnerability
HIGHGHSA-g9ww-x58f-9g6m is a HIGH (CVSS 8.4) contrast badaml injection allows arbitrary vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Github.com/edgelesssys/contrast libraries in the Go ecosystem. The issue involves contrast badaml injection allows arbitrary code execution. Remediation is available by upgrading affected packages to version 1.18.0.
GHSA-g9ww-x58f-9g6m at a Glance
Security Impact
CVSS: 8.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N).
How to Fix GHSA-g9ww-x58f-9g6m
To remediate this vulnerability, upgrade all affected Github.com/edgelesssys/contrast dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/edgelesssys/contrast to 1.18.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/edgelesssys/contrast
How to Check if You Are Affected
To determine whether your application is affected by GHSA-g9ww-x58f-9g6m, inspect your project dependencies for Github.com/edgelesssys/contrast:
inspect dependencies for github.com/edgelesssys/contrast
Analyze the terminal output to locate any version of Github.com/edgelesssys/contrast in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.18.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Github.com/edgelesssys/contrast, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-g9ww-x58f-9g6m Affected Github.com/edgelesssys/contrast Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/edgelesssys/contrast
|
Go |
< 1.18.0
|
1.18.0
|
References
Frequently Asked Questions
What is GHSA-g9ww-x58f-9g6m?
Which Github.com/edgelesssys/contrast versions are affected?
What version fixes GHSA-g9ww-x58f-9g6m?
Is github.com/edgelesssys/contrast affected?
What is the CVSS score of GHSA-g9ww-x58f-9g6m?
What CWE is associated with GHSA-g9ww-x58f-9g6m?
How can I check Go dependencies for GHSA-g9ww-x58f-9g6m?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g9ww-x58f-9g6m",
"modified" : "2026-03-26T19:49:27Z",
"published" : "2026-03-26T19:49:27Z",
"aliases" : [ ],
"summary" : "Contrast BadAML injection allows arbitrary code execution",
"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- <https://blackhat.com/eu-24/briefings/schedule/#aml-injection-attacks-on-confidential-vms-42723>\n- <https://dl.acm.org/doi/pdf/10.1145/3719027.3765123>\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't 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/edgelesssys/contrast"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.18.0"
} ]
} ]
} ],
"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"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-26T19:49:27Z",
"nvd_published_at" : null
}
}