# GHSA-xrv8-2pf5-f3q7: nitro-tpm-pcr-compute may allow kernel command line modification by an account operator

> Account operators can bypass root filesystem integrity validation by modifying kernel command lines if PCR12 is not validated in KMS policies.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Not stated
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 5 Dec 2025

## What is GHSA-xrv8-2pf5-f3q7?

GHSA-xrv8-2pf5-f3q7 is a vulnerability in nitro-tpm-pcr-compute, published on 5 Dec 2025. 

### Official description

## Summary

Adding default PCR12 validation to ensure that account operators can not modify kernel command line parameters, potentially bypassing root filesystem integrity validation.

Attestable AMIs are based on the systemd Unified Kernel Image (UKI) concept which uses systemd-boot to create a single measured UEFI binary from a Linux kernel, its initramfs, and kernel command line. The embedded kernel command line contains a dm-verity hash value that establishes trust in the root file system.

When UEFI Secure Boot is disabled, systemd-boot appends any command line it receives to the kernel command line. Account operators with the ability to modify UefiData can install a boot variable with a command line that deactivates root file system integrity validation, while preserving the original PCR4 value.

Systemd-boot provides separate measurement of command line modifications in PCR12.

## Impact

In line with the TPM 2.0 specification and systemd-stub logic, KMS policies that do not include validation for PCR12 (command line measurement) or PCR7 (enabled Secure Boot) may allow kernel command line modification by an account operator.

## Patches 

Version 1.1.0 of nitro-tpm-pcr-compute has been updated to include PCR12 with a static zero value. The updated tool now outputs PCR12 in the JSON measurements:

```json
{
  "Measurements": {
    "HashAlgorithm": "SHA384",
    "PCR4": "<hex string>",
    "PCR7": "<hex string>",
    "PCR12": "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
  }
}
```

## Workarounds

For users who cannot upgrade to version 1.1.0 of nitro-tpm-pcr-compute immediately, the following workarounds are available:

1. **Manually add PCR12 to KMS policies:** Add PCR12 with a static zero value to your AWS KMS key policies:

```txt
kms:RecipientAttestation:NitroTPMPCR12:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
```

2. **Enable and validate UEFI Secure Boot:** Configure your Attestable AMI to use UEFI Secure Boot and validate its enablement via PCR7 in your KMS policy. When UEFI Secure Boot is active, the command line cannot be overwritten.

## Which versions are affected by GHSA-xrv8-2pf5-f3q7?

2 open source packages ship an affected version, including nitro-tpm-pcr-compute.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `nitro-tpm-pcr-compute` | crates.io | All versions | 1.1.0 |
| `nitro-tpm-pcr-compute` | crates.io | All versions | 1.1.0 |

## How do I fix GHSA-xrv8-2pf5-f3q7?

Upgrade nitro-tpm-pcr-compute to 1.1.0 or later.

## Is GHSA-xrv8-2pf5-f3q7 being exploited?

There is no known exploitation of GHSA-xrv8-2pf5-f3q7 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-xrv8-2pf5-f3q7 and fix it if it is affected.

What it is: GHSA-xrv8-2pf5-f3q7 is a vulnerability in nitro-tpm-pcr-compute, published on 5 Dec 2025. 
Exploitation: There is no known exploitation of GHSA-xrv8-2pf5-f3q7 in the wild and no public exploit code.

Affected packages and fixed versions:
- nitro-tpm-pcr-compute (crates.io): affected all versions; fixed in 1.1.0
- nitro-tpm-pcr-compute (crates.io): affected all versions; fixed in 1.1.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-xrv8-2pf5-f3q7/ (Markdown: https://insights.sbomify.com/GHSA-xrv8-2pf5-f3q7/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-xrv8-2pf5-f3q7

---
From sbomify Insights: https://insights.sbomify.com/GHSA-xrv8-2pf5-f3q7/
Summaries are generated and may contain mistakes; the official description above is the record.
