etcd Peer Auth: The Flag Nobody Sets on 2380
Overview
etcd's peer listener on TCP 2380 accepts peer connections without a trusted certificate unless the peer-client-cert-auth flag is set to true. kubeadm sets it by default, so the gap is in clusters built other ways, and adding a member still goes through the client API on 2379.
At a glance
- Symptom
- An attacker with network reach to port 2380 joins a rogue etcd member, registered through the client API on 2379, without presenting any verified…
- Likely cause
- peer-client-cert-auth left disabled on the etcd static pod manifest while client-cert-auth is enforced on 2379.
- Impact
- The rogue member joins the Raft quorum and receives the full replication stream of Secrets and cluster state, invisible to Kubernetes audit logging.
- Verification signal
- Re-run the detection test and a controlled negative-path test.
- Safe correction
- Enforce peer-client-cert-auth=true with CN-restricted peer certificates and firewall port 2380 to a pinned inventory of known etcd node IPs.
- Rollback or recovery
- Restore the exported configuration if the new control blocks required production traffic, then narrow the policy before redeployment.
The Trap
The --peer-client-cert-auth flag on the etcd static pod manifest, left unset or explicitly false while --client-cert-auth is correctly enforced on port 2379.
The Default State
kubeadm sets --peer-client-cert-auth=true, but many manual etcd bootstraps configure --peer-cert-file and --peer-key-file so peer traffic on TCP 2380 is TLS-encrypted, and stop there. Encryption alone does not require the connecting peer to present a certificate that etcd actually verifies.
Without --peer-client-cert-auth=true, etcd will complete a TLS handshake with any node that can reach 2380, self-signed cert or none, because the server never mandates client cert verification on the peer listener. The 2379 client port gets all the attention during hardening reviews; 2380 gets none.
The Blast Radius
An attacker with network reach into the control-plane subnet, via a compromised CNI plugin, a flat VPC peering, or an SSRF pivot from a workload pod, can reach 2380 without proving its identity.
etcdctl member add itself goes through the client API on 2379, so the realistic path is a node registered there (via a stolen client certificate or a leftover member entry) that then joins over 2380 unchallenged.
Once it syncs, that rogue member receives the replicated keyspace: every Secret and ServiceAccount token, unencrypted unless encryption at rest is configured, regardless of RBAC. Any write made directly in etcd bypasses apiserver admission control and never appears in the API server’s audit log.
The Lead Mechanic Fix
Take an etcd snapshot and copy each manifest aside for rollback, confirm every member’s peer certificate chains to the trusted CA with the expected CN, then change one member at a time, checking etcdctl endpoint health --cluster before the next, since a wrong CA or CN breaks peer traffic and can cost quorum.
Set --peer-client-cert-auth=true on every etcd static pod manifest, add --peer-cert-allowed-cn restricted to the exact CN values used by known etcd nodes, and point --peer-trusted-ca-file at a CA issued solely for peer identities, never reused for client certs.
Firewall 2380 to the known etcd node IPs only, then verify continuously with etcdctl member list --write-out=table cross-checked against a pinned node inventory on a scheduled job, alerting on any member ID not present in that baseline.
Related reading
Apply the safer control
Before you change production
Confirm the affected scope, export the current configuration, and test the replacement control in a non-production environment first.
Fix commands and configuration
etcdctl endpoint health --cluster--peer-client-cert-auth=true--peer-cert-allowed-cnVerify, roll back or escalate
Verify
Re-run the detection test and a controlled negative-path test. Confirm the unsafe behaviour is blocked while approved traffic still succeeds.
Rollback
Restore the exported configuration if the new control blocks required production traffic, then narrow the policy before redeployment.
Escalate
Escalate when the blast radius is uncertain, the control cannot be tested safely, or remediation requires an outage or security exception.
Fixed? Get the next one before it hits you: The KBY Brief
Practical fixes for the systems you run, by email about twice a week. Unsubscribe at any time.
About this page
Credited to
Dates
Published
Last updated
Corrections
- : Corrected during a review of published articles. Details
Was this useful?
Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.
