Arbitrary Code Execution Vulnerability in Contrast Package Due to BadAML Injection
Summary
GHSA-g9ww-x58f-9g6m: Contrast BadAML injection allows arbitrary code execution. Affects github.com/edgelesssys/contrast versions < 1.18.0. Fixed in 1.18.0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The Contrast package, developed by Edgeless Systems, is designed for secure confidential computing environments. It leverages the ACPI interface to facilitate communication between the host and guest virtual machines. However, it is susceptible to a BadAML injection attack, which can lead to severe security breaches.
Vulnerability Detail
The BadAML vulnerability allows an attacker with control over the host system to execute arbitrary AML code within a confidential virtual machine. This exploitation occurs through the ACPI interface, where malicious AML code can be crafted and executed by the Linux kernel's interpreter. The implications are significant, as the attacker gains access to the full guest memory, including private pages, potentially compromising sensitive data and system integrity. This vulnerability is not limited to the Contrast package but affects all confidential computing setups utilizing the ACPI interface.
How To Fix
Latest published version: v1.25.1 as of 22 Oct 2026
go get github.com/edgelesssys/contrast@v1.25.1
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
1.18.0
This is the first release that contains the fix.
go get github.com/edgelesssys/contrast@v1.18.0
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, users can limit access to the host system to mitigate the risk of an attacker gaining control. However, the best solution is to apply the patch as soon as possible.
Conclusion
The BadAML injection vulnerability poses a significant risk to systems using the Contrast package, allowing for arbitrary code execution in confidential virtual machines. Users are strongly advised to update to version 1.18.0 or later to mitigate this risk effectively. Monitoring tools like Vulert can assist in identifying vulnerabilities in your applications.
See every vulnerability recorded for github.com/edgelesssys/contrast →
FAQ
The BadAML vulnerability is an AML injection attack that allows arbitrary code execution within a confidential virtual machine, exploiting the ACPI interface.
If your system is running a vulnerable version of the Contrast package, an attacker with host control can execute malicious code, potentially compromising sensitive data.
If immediate updates are not possible, limit access to the host system to reduce the risk of exploitation until the patch can be applied.
No, this vulnerability is a generic issue affecting all confidential computing setups that utilize the ACPI interface.
You can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities in your software. You can check if your application is affected by this vulnerability using the Vulert playground without any signup.
References
Related vulnerabilities
Recent vulnerabilities recorded for github.com/edgelesssys/contrast.