CVE-2026-6420
Executive Summary
CVE-2026-6420 is a vulnerability in the Keylime verifier component, specifically affecting the push model deployment. The flaw lies in the use of a hardcoded challenge nonce for TPM quote attestation instead of a cryptographically random value. An attacker with root access on an enrolled monitored machine can exploit this by stockpiling valid TPM quotes and replaying them to evade detection after compromising the system. The CVSS score is 6.3 (Medium), but the impact is significant for environments relying on TPM-based attestation for integrity monitoring.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
Keylime is an open-source project used for remote attestation of TPM-equipped systems. This vulnerability does not directly affect package registries (NPM, PyPI, Go, Ruby) but impacts the Keylime agent and verifier components. Organizations using Keylime in push model deployments should treat this as a critical supply chain integrity issue, as it undermines the trust model of the attestation system.
CVSS Breakdown & Threat Level
- CVSS Score: 6.3 (Medium)
- Vector: CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
- Attack Vector: Local (AV:L) – requires root access on the monitored machine.
- Attack Complexity: Low (AC:L) – no special conditions needed.
- Privileges Required: High (PR:H) – attacker must have root access.
- User Interaction: None (UI:N)
- Scope: Unchanged (S:U)
- Confidentiality Impact: High (C:H) – attacker can hide malicious activity.
- Integrity Impact: High (I:H) – attacker can replay valid quotes to bypass integrity checks.
- Availability Impact: High (A:H) – attacker can maintain persistent compromise undetected.
Threat Level: Medium, but with high impact in targeted environments. The requirement for root access reduces the likelihood of widespread exploitation, but the vulnerability completely breaks the attestation trust model.
Deep Dive & Mechanics
The Keylime verifier, in push model deployments, uses a hardcoded challenge nonce for TPM quote attestation. In a proper implementation, the verifier should generate a fresh, cryptographically random nonce for each attestation request. The TPM then signs this nonce along with platform configuration registers (PCRs) to produce a quote. The verifier validates the signature and checks that the nonce matches the one it sent.
In this vulnerable version, the nonce is hardcoded (e.g., a static value like 0x0000000000000000 or a predictable constant). An attacker with root access on the monitored machine can:
- Capture a valid TPM quote from a legitimate boot or state.
- Store this quote along with the hardcoded nonce.
- After compromising the system (e.g., installing malware), replay the stored quote to the verifier.
- The verifier accepts the replayed quote because the nonce matches the hardcoded value, and the signature is valid.
This allows the attacker to maintain a false sense of integrity while the system is compromised. The vulnerability only affects the push model, where the verifier initiates attestation requests.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
# In verifier.py
HARDCODED_NONCE = b'\x00' * 20 # Static nonce
def request_attestation(agent):
nonce = HARDCODED_NONCE
quote = agent.get_tpm_quote(nonce)
if verify_quote(quote, nonce):
return True
return False
Patched Code (Conceptual):
# In verifier.py
import os
def request_attestation(agent):
nonce = os.urandom(20) # Cryptographically random nonce
quote = agent.get_tpm_quote(nonce)
if verify_quote(quote, nonce):
return True
return False
The patch replaces the hardcoded nonce with a cryptographically random value generated per request. This prevents replay attacks because each nonce is unique and unpredictable.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Root access on a Keylime agent machine (push model).
- Network access to the Keylime verifier.
- Ability to capture TPM quotes (requires TPM access).
Exploitation Steps:
Capture a valid quote:
# On the agent machine, as root tpm2_quote -c 0x81000001 -l sha256:0,1,2,3 -q 0000000000000000000000000000000000000000 -m quote.msg -s quote.sig(The
-qparameter is the hardcoded nonce, e.g., 20 bytes of zeros.)Compromise the system:
- Install malware, modify files, etc.
Replay the quote:
- When the verifier requests attestation, send the captured quote instead of a fresh one.
- This can be done by modifying the agent's response or using a man-in-the-middle approach.
Automated Exploit (Conceptual):
import socket
import struct
# Hardcoded nonce (20 bytes of zeros)
HARDCODED_NONCE = b'\x00' * 20
def replay_quote(sock, captured_quote):
# Send the captured quote as response to verifier
sock.send(captured_quote)
Blue Team
Detection:
- Monitor for repeated use of the same nonce in attestation requests.
- Log all nonces used by the verifier and check for duplicates.
- Use network monitoring to detect replay patterns.
Honeypot:
- Deploy a fake Keylime agent that logs all nonces and quotes.
- Alert if the same nonce is used multiple times.
Lab Setup:
- Install Keylime verifier and agent in a test environment.
- Configure push model.
- Capture a valid quote using the hardcoded nonce.
- Simulate compromise and replay the quote.
- Verify that the verifier accepts the replayed quote.
Indicators of Compromise (IOCs)
- Network: Repeated attestation requests with identical nonce values.
- Host: Presence of stored TPM quotes (e.g.,
quote.msg,quote.sig) on the agent. - Logs: Verifier logs showing the same nonce used across multiple attestation cycles.
- TPM: Unusual TPM quote generation patterns (e.g., quotes generated without a fresh nonce).
Detection Engineering
YARA Rule
rule CVE_2026_6420_Keylime_Hardcoded_Nonce {
meta:
description = "Detects hardcoded nonce usage in Keylime verifier code"
author = "Valters IT"
date = "2026-01-01"
reference = "CVE-2026-6420"
strings:
$hardcoded_nonce = /HARDCODED_NONCE\s*=\s*[bB]?['"][\x00]{20}['"]/
$static_nonce = /nonce\s*=\s*[bB]?['"][\x00]{20}['"]/
condition:
any of them
}
Sigma Rule
title: CVE-2026-6420 - Keylime Hardcoded Nonce Detection
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects repeated use of the same nonce in Keylime attestation logs
author: Valters IT
date: 2026-01-01
logsource:
product: linux
service: keylime
detection:
selection:
EventID: 1001 # Example: Verifier attestation request
Nonce: '0000000000000000000000000000000000000000'
condition: selection | count() by Nonce > 1
falsepositives:
- Legitimate use of hardcoded nonce in test environments
level: high
Suricata Rule
alert tcp any any -> any 443 (msg:"CVE-2026-6420 - Keylime Hardcoded Nonce Replay"; content:"|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate:
- Patch: Apply the official patch from Keylime when available. The fix replaces the hardcoded nonce with a cryptographically random value.
- Workaround: Switch from push model to pull model if possible, as the vulnerability only affects push model deployments.
- Monitor: Enable detailed logging of nonces and quotes. Alert on duplicate nonces.
Long-term:
- Code Review: Ensure all cryptographic nonces are generated using secure random number generators.
- Testing: Include replay attack tests in the CI/CD pipeline.
- Architecture: Consider using TPM session-based attestation for stronger guarantees.
Detection:
- Deploy the YARA, Sigma, and Suricata rules provided.
- Monitor for anomalous TPM quote patterns.
Valters IT
{/* [Security Hash: D69B732B12151CB6C59BC45B] */}