CVE-2021-27098
📋 TL;DR
This vulnerability in SPIRE allows authenticated agents to request X.509 certificates for SPIFFE IDs they're not authorized to distribute. Attackers with valid agent certificates could obtain certificates for unauthorized identities within the same trust domain. Affects SPIRE versions 0.8.1 through 0.8.4 and specific earlier versions before patches.
💻 Affected Systems
- SPIRE (SPIFFE Runtime Environment)
📦 What is this software?
Spire by Cncf
Spire by Cncf
Spire by Cncf
Spire by Cncf
Spire by Cncf
⚠️ Risk & Real-World Impact
Worst Case
An attacker with a compromised agent certificate could obtain X.509 certificates for any SPIFFE ID within the same trust domain, enabling impersonation of other services and potential lateral movement.
Likely Case
Malicious insider or compromised agent could obtain unauthorized certificates for services they shouldn't have access to, potentially bypassing authorization controls.
If Mitigated
With proper agent certificate controls, only authorized agents can trigger this, limiting exposure to already-trusted entities within the same trust domain.
🎯 Exploit Status
Requires valid agent certificate and ability to craft specific FetchX509SVID RPC requests to the Legacy Node API.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 0.8.5, 0.9.4, 0.10.2, 0.11.3, or 0.12.1
Vendor Advisory: https://github.com/spiffe/spire/security/advisories/GHSA-h746-rm5q-8mgq
Restart Required: Yes
Instructions:
1. Identify your SPIRE version. 2. Upgrade to patched version: 0.8.5, 0.9.4, 0.10.2, 0.11.3, or 0.12.1. 3. Restart SPIRE services. 4. Verify agent certificates remain valid.
🔧 Temporary Workarounds
Disable Legacy Node API
allDisable the vulnerable Legacy Node API endpoint if not required
Configure SPIRE server to disable Legacy Node API in configuration
Restrict Agent Access
allTighten agent certificate issuance and rotation policies
Review and restrict agent registration entries and SPIFFE ID authorizations
🧯 If You Can't Patch
- Implement strict network segmentation between SPIRE agents and servers
- Enhance monitoring of certificate issuance logs for anomalous patterns
🔍 How to Verify
Check if Vulnerable:
Check SPIRE server version: spire-server version
Check Version:
spire-server version
Verify Fix Applied:
Confirm version is 0.8.5, 0.9.4, 0.10.2, 0.11.3, or 0.12.1
📡 Detection & Monitoring
Log Indicators:
- Unusual FetchX509SVID requests
- Certificate issuance for SPIFFE IDs outside agent's normal scope
- Multiple certificate requests from same agent
Network Indicators:
- Abnormal RPC traffic to Legacy Node API
- Increased certificate issuance rate
SIEM Query:
source="spire" AND ("FetchX509SVID" OR "certificate issuance") AND NOT authorized_spiffe_id