CVE-2026-6420: Keylime Keylime Has A Hardcoded Attestation Vulnerability

MODERATE
Advisory Identifier: GHSA-q8w6-w55c-ccv5
CVSS 6.3
CWE-1241 CWE-547 CWE-294 CWE-329
Published
Advisory Summary

CVE-2026-6420 is a MODERATE (CVSS 6.3) keylime has a hardcoded attestation vulnerability (CWE-1241: Use of Predictable Algorithm in Random Number Generator) affecting Keylime libraries in the PyPI ecosystem. The issue involves keylime has a hardcoded attestation challenge nonce that allows replay attacks. Remediation is available by upgrading affected packages to version 7.14.2.

CVE-2026-6420 at a Glance

CVE Identifier CVE-2026-6420
GHSA Identifier GHSA-q8w6-w55c-ccv5
Severity MODERATE
CVSS v3.1 Base Score 6.3
CWE Classification CWE-1241: Use of Predictable Algorithm in Random Number Generator
Affected Product Keylime
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 6.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:L).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability Low (A:L)

How to Fix CVE-2026-6420

To remediate this vulnerability, upgrade all affected Keylime dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

keylime fixed: 7.14.2
pip install keylime>=7.14.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show keylime

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-6420, inspect your installed packages using pip:

pip show keylime

Analyze the terminal output to locate any version of Keylime in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.14.2), your application is affected.

Note: The pip show keylime command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1241: Use of Predictable Algorithm in Random Number Generator, where the device uses an algorithm that is predictable and generates a pseudo-random number. In Keylime, 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

## CVE-2026-6420: Hardcoded attestation challenge nonce allows replay attacks ### Impact The `CertificationParameters.generate_challenge()` method in the push attestation protocol uses a hardcoded challenge nonce instead of generating a cryptographically random value. This removes the nonce-based replay protection from TPM quote attestation. An attacker with root access on a monitored agent node can exploit this by stockpiling valid TPM quotes (using `tpm2_quote` with the known nonce) before compromising the system, then replaying them to evade detection by the verifier. The push attestation timeout (~10s) constrains the generation window, but TPM throughput allows stockpiling ~50-200 quotes, enabling approximately 8-33 minutes of undetected compromise with default settings. The attack is limited to a single agent node (AK signature binding prevents cross-agent replay). The pull-mode (legacy) attestation path is not affected. **Affected versions:** >= 7.14.0, <= 7.14.1 **CVSS:** 6.3 Medium (`CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:L`) | Metric | Value | Rationale | |---|---|---| | AV | Local | Exploitation requires local access to the agent machine (stop agent, access TPM, run replacement). The network transmission of quotes to the verifier is normal protocol operation. | | AC | Low | Deterministic attack: publicly visible nonce, standard `tpm2-tools`, no race conditions. | | PR | High | Root on a legitimate enrolled node is required. The vulnerability does not help gain access -- it only helps evade detection after root is obtained. No value against a machine the attacker already controls. | | UI | None | Fully automated after initial setup. | | S | Unchanged | AK signature binding confines impact to the single compromised agent. | | C | High | Compromised node continues receiving bootstrap keys, payloads, and secrets intended for trusted nodes. | | I | High | Verifier cannot distinguish a healthy system from a fully compromised one during the evasion window. | | A | Low | Only the compromised agent's revocation and incident response are suppressed; the system as a whole remains operational. | The base score does not fully capture the operational severity: Keylime exists to detect machine compromise, so 8-33 minutes of undetected compromise is operationally critical. The fix is a one-line change and should be applied immediately regardless of the base score. ### Patches The fix restores the original random nonce generation (one-line change in `keylime/models/verifier/evidence.py`): ```python # Before (vulnerable): def generate_challenge(self, bit_length): # self.challenge = Nonce.generate(bit_length) self.challenge = bytes.fromhex("49beed365aac777dae23564f5ad0ec") # After (fixed): def generate_challenge(self, bit_length): self.challenge = Nonce.generate(bit_length) ``` Users should upgrade to the version containing this fix (7.14.2). ### Workarounds There is no complete workaround. The following existing mechanisms provide partial mitigation and are already active by default (no configuration needed): 1. **TPM clock monotonicity check** limits each distinct stockpiled quote to a single use, bounding the total evasion time. 2. **Push attestation timeout** (default 10s) prevents the attacker from going silent and constrains the quote generation window. Reducing `quote_interval` increases the attestation frequency but does not prevent the stockpiling attack. ### References - CWE-329: Generation of Predictable IV/Nonce (primary -- hardcoded nonce in cryptographic attestation protocol) - CWE-547: Use of Hard-Coded, Security-relevant Constants (hardcoded constant left in production code) - CWE-294: Authentication Bypass by Capture-replay (consequence -- enables replay attacks) - CWE-1241: Use of Predictable Algorithm in Random Number Generator - Introducing commit: [`2bf91197`](https://github.com/keylime/keylime/commit/2bf91197) via [PR #1814](https://github.com/keylime/keylime/pull/1814) - TCG TPM 2.0 Library Specification, Part 1, Section 18.4 (TPM2_Quote) - IETF RATS Architecture (RFC 9334), Section 8 (Freshness)

CVE-2026-6420 Affected Keylime Versions

1 component(s)
Fixed Versions:
7.14.2
Product / Package Ecosystem Affected Versions Fixed Version
keylime
PyPI
≥ 7.14.0
< 7.14.2
7.14.2

References

Frequently Asked Questions

What is CVE-2026-6420?
CVE-2026-6420 is a security vulnerability in Keylime involving Keylime has a hardcoded attestation challenge nonce that allows replay attacks under CWE-1241: Use of Predictable Algorithm in Random Number Generator.
Which Keylime versions are affected?
Affected versions include releases prior to 7.14.2 across affected packages: keylime.
What version fixes CVE-2026-6420?
Upgrading to 7.14.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is keylime affected?
Yes, keylime is affected in releases prior to 7.14.2. Upgrade your dependency to 7.14.2 or later.
What is the CVSS score of CVE-2026-6420?
CVE-2026-6420 has a CVSS v3.1 base score of 6.3 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:L.
What CWE is associated with CVE-2026-6420?
CVE-2026-6420 is classified under CWE-1241: Use of Predictable Algorithm in Random Number Generator (The device uses an algorithm that is predictable and generates a pseudo-random number.).
How can I check PyPI dependencies for CVE-2026-6420?
Run the dependency tree command: 'pip show keylime'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-q8w6-w55c-ccv5",
  "modified" : "2026-05-11T14:42:46Z",
  "published" : "2026-05-11T14:42:46Z",
  "aliases" : [ "CVE-2026-6420" ],
  "summary" : "Keylime has a hardcoded attestation challenge nonce that allows replay attacks",
  "details" : "## CVE-2026-6420: Hardcoded attestation challenge nonce allows replay attacks\n\n### Impact\n\nThe `CertificationParameters.generate_challenge()` method in the push attestation protocol uses a hardcoded challenge nonce instead of generating a cryptographically random value. This removes the nonce-based replay protection from TPM quote attestation.\n\nAn attacker with root access on a monitored agent node can exploit this by stockpiling valid TPM quotes (using `tpm2_quote` with the known nonce) before compromising the system, then replaying them to evade detection by the verifier. The push attestation timeout (~10s) constrains the generation window, but TPM throughput allows stockpiling ~50-200 quotes, enabling approximately 8-33 minutes of undetected compromise with default settings.\n\nThe attack is limited to a single agent node (AK signature binding prevents cross-agent replay). The pull-mode (legacy) attestation path is not affected.\n\n**Affected versions:** >= 7.14.0, <= 7.14.1\n\n**CVSS:** 6.3 Medium (`CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:L`)\n\n| Metric | Value | Rationale |\n|---|---|---|\n| AV | Local | Exploitation requires local access to the agent machine (stop agent, access TPM, run replacement). The network transmission of quotes to the verifier is normal protocol operation. |\n| AC | Low | Deterministic attack: publicly visible nonce, standard `tpm2-tools`, no race conditions. |\n| PR | High | Root on a legitimate enrolled node is required. The vulnerability does not help gain access -- it only helps evade detection after root is obtained. No value against a machine the attacker already controls. |\n| UI | None | Fully automated after initial setup. |\n| S | Unchanged | AK signature binding confines impact to the single compromised agent. |\n| C | High | Compromised node continues receiving bootstrap keys, payloads, and secrets intended for trusted nodes. |\n| I | High | Verifier cannot distinguish a healthy system from a fully compromised one during the evasion window. |\n| A | Low | Only the compromised agent's revocation and incident response are suppressed; the system as a whole remains operational. |\n\nThe base score does not fully capture the operational severity: Keylime exists to detect machine compromise, so 8-33 minutes of undetected compromise is operationally critical. The fix is a one-line change and should be applied immediately regardless of the base score.\n\n### Patches\n\nThe fix restores the original random nonce generation (one-line change in `keylime/models/verifier/evidence.py`):\n\n```python\n# Before (vulnerable):\ndef generate_challenge(self, bit_length):\n    # self.challenge = Nonce.generate(bit_length)\n    self.challenge = bytes.fromhex(\"49beed365aac777dae23564f5ad0ec\")\n\n# After (fixed):\ndef generate_challenge(self, bit_length):\n    self.challenge = Nonce.generate(bit_length)\n```\n\nUsers should upgrade to the version containing this fix (7.14.2).\n\n### Workarounds\n\nThere is no complete workaround. The following existing mechanisms provide partial mitigation and are already active by default (no configuration needed):\n\n1. **TPM clock monotonicity check** limits each distinct stockpiled quote to a single use, bounding the total evasion time.\n2. **Push attestation timeout** (default 10s) prevents the attacker from going silent and constrains the quote generation window.\n\nReducing `quote_interval` increases the attestation frequency but does not prevent the stockpiling attack.\n\n### References\n\n- CWE-329: Generation of Predictable IV/Nonce (primary -- hardcoded nonce in cryptographic attestation protocol)\n- CWE-547: Use of Hard-Coded, Security-relevant Constants (hardcoded constant left in production code)\n- CWE-294: Authentication Bypass by Capture-replay (consequence -- enables replay attacks)\n- CWE-1241: Use of Predictable Algorithm in Random Number Generator\n- Introducing commit: [`2bf91197`](https://github.com/keylime/keylime/commit/2bf91197) via [PR #1814](https://github.com/keylime/keylime/pull/1814)\n- TCG TPM 2.0 Library Specification, Part 1, Section 18.4 (TPM2_Quote)\n- IETF RATS Architecture (RFC 9334), Section 8 (Freshness)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "keylime"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.14.0"
      }, {
        "fixed" : "7.14.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 7.14.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/keylime/keylime/security/advisories/GHSA-q8w6-w55c-ccv5"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-6420"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/security/cve/CVE-2026-6420"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2458889"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/keylime/keylime"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1241", "CWE-294", "CWE-329", "CWE-547" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-11T14:42:46Z",
    "nvd_published_at" : null
  }
}