Repository navigation
Security: KMS get_temp_ca_cert returns temp CA private key without authentication #619
Description
Note: This issue documents a vulnerability that was originally reported privately as the repository security advisory GHSA-jqq8-f829-47qf by @pbeza.
Root Cause
The get_temp_ca_cert endpoint returns temp_ca_key (a temporary CA private key) to any caller without requiring mTLS, attestation, or any form of authentication. This endpoint is designed for bootstrapping — new CVMs need to obtain a temporary CA key to create their initial RA-TLS certificates before they can establish mTLS. However, the endpoint is available to any network-reachable caller.
Attack Path
- Attacker discovers the KMS network endpoint (e.g., via F12011's unmeasured
kms_urls) - Attacker calls
get_temp_ca_cert— no authentication required - KMS returns the temp CA private key
- Attacker creates a valid RA-TLS client certificate signed by the temp CA
- Attacker uses the forged certificate to call authenticated KMS endpoints (e.g.,
get_app_key,sign_cert) - Combined with F12003: if
quote_enabled=false, attacker can also obtain root keys
Impact
Any network-reachable attacker can forge RA-TLS client certificates, impersonating any CVM to the KMS. This bypasses the mTLS authentication boundary. The blast radius depends on what additional checks KMS performs on authenticated requests (attestation verification), but combined with F12003, it provides full root secret extraction.
Suggested Fix
Restrict get_temp_ca_cert access through network-level controls (e.g., only accessible from the host's internal bridge network). Alternatively, implement a challenge-response mechanism where the CVM must prove it's running in a TDX environment before receiving the temp CA key. Consider using a short-lived, single-use token generated by the VMM for each new CVM.
Note: This finding was reported automatically as part of an AI/Claude-driven internal audit by the NEAR One MPC team. It has not been manually verified by a human to confirm whether it constitutes an actual security issue.
Activity
kvinwang commentedon Mar 27, 2026
Maintainer response (copied from private security advisory GHSA-jqq8-f829-47qf):
This appears to be a duplicate of GHSA-gf25-vghj-6wh5. Please see our response there.