Attackers Can Exploit Kubernetes SPIFFE/SPIRE for Workload Identity Spoofing
Researchers have detailed a post-exploitation technique allowing attackers with root access on a Kubernetes node to misuse SPIFFE/SPIRE metadata and impersonate co-located workloads.

Researchers from Unit 42 have uncovered a sophisticated post-exploitation technique that could enable attackers with root access on a compromised Kubernetes node to hijack workload identities within a SPIFFE/SPIRE environment. SPIFFE (Secure Production Identity Framework for Everyone) and its reference implementation, SPIRE, are widely adopted in cloud-native architectures to provide ephemeral, cryptographically verifiable identities for workloads, effectively replacing traditional secrets. This new research highlights a critical flaw in the trust model: once an attacker achieves root privileges on a node, the fundamental assumption that the node itself is trustworthy collapses.
The core of the attack involves manipulating the Linux control group (cgroup) information that the SPIRE agent uses during its workload attestation process. By spoofing this metadata, an attacker can trick the SPIRE agent into issuing a Verifiable Identity Document (SVID) – the cryptographic credential proving a workload's identity – to an attacker-controlled process, rather than the legitimate workload it belongs to. This allows the attacker to impersonate other workloads running on the same node, gaining unauthorized access and enabling further lateral movement within the Kubernetes cluster.
SPIFFE's identity system relies on three key components: the SPIFFE ID, which is a unique, URI-style name for a workload; the SVID, which serves as the verifiable credential (often an X.509 certificate or JWT) proving the workload's identity; and the Trust Bundle, a set of root certificates used to verify the authenticity of the SVID. The security of this system hinges on the SPIRE agent correctly identifying the workload requesting an SVID. The described attack bypasses this by feeding false information about the workload's identity to the agent.
While Unit 42 has not observed this specific technique being exploited in the wild, the implications are significant for organizations relying on SPIFFE/SPIRE for secure workload communication and authentication. The research team developed an open-source tool named 'Spooffe' to help defenders test their environments for this vulnerability. Spooffe automates the process of manipulating cgroup metadata to attempt the extraction of workload identities, allowing security teams to assess their exposure and the potential impact area.
The researchers strongly advise organizations to incorporate this threat into their threat modeling for SPIFFE/SPIRE deployments. They recommend hardening nodes, strictly restricting root access, prohibiting privileged containers, and limiting host access where possible. Minimizing reliance on weak selectors within the SPIFFE/SPIRE configuration can also reduce the attack surface. Essentially, any process with root access on a node should be considered capable of accessing all cryptographic identities scoped to that node.
Palo Alto Networks customers are protected against these threats through products like Cortex XDR and XSIAM, as well as Cortex Cloud Identity Threat Detection. The company also offers incident response services for organizations that suspect a compromise.
This research underscores the ongoing challenge of securing complex cloud-native environments. As identity management systems become more sophisticated, attackers continually seek ways to exploit the underlying trust assumptions. The ability to spoof machine identities, particularly in a distributed system like Kubernetes, represents a significant advancement in attacker capabilities, enabling more stealthy and impactful compromises.