Chaos Mesh Security Testing: Privilege Escalation via Experiments, RBAC Bypass, and Node Compromise

Chaos Mesh is a Kubernetes-native chaos engineering platform that injects faults — CPU stress, network latency, pod kills, file system errors — into running workloads for resilience testing. Its security posture is inherently complex because the chaos-daemon DaemonSet must run as a privileged container with host PID and host network access to inject faults at the kernel level, creating a node compromise primitive for any attacker who can execute experiments; the ChaosExperiment CRDs are scoped by namespace but the controller's ClusterRole typically allows listing all pods across namespaces enabling cross-namespace targeting; the Chaos Dashboard web UI often has weak or absent authentication for on-premise deployments; and Chaos Mesh's webhook allows creating experiments that consume all CPU or fill disk on target nodes — a denial of service against legitimate workloads if the RBAC is over-permissive. This guide covers systematic Chaos Mesh security assessment.

Table of Contents

  1. Chaos Mesh Discovery
  2. Chaos Dashboard Authentication Testing
  3. RBAC and Experiment Scope Testing
  4. chaos-daemon Privileged Container Abuse
  5. Experiment-Based Denial of Service
  6. Chaos Mesh Security Hardening

Chaos Mesh Discovery

# Chaos Mesh default ports:
# 2334  — chaos-controller-manager webhook
# 10080 — chaos-daemon gRPC
# 2333  — chaos-dashboard HTTP (web UI)

# Check if Chaos Dashboard is accessible
curl -s http://chaos-mesh.example.com:2333/ 2>/dev/null | grep -i "chaos" | head -3

# List Chaos Mesh CRDs
kubectl get crds 2>/dev/null | grep chaos-mesh | head -20
# chaos-mesh.org CRDs: podchaos, networkchaos, iochaos, stresschaos, etc.

# List all active experiments across all namespaces
kubectl get chaos -A 2>/dev/null | head -20
# Note: "chaos" is a shortcut for all Chaos Mesh CRs in some versions

kubectl get podchaos,networkchaos,stresschaos,iochaos -A 2>/dev/null | head -20

RBAC and Experiment Scope Testing

# Check if a namespace-scoped user can create experiments targeting other namespaces
# Create a PodChaos experiment targeting pods outside the user's namespace

kubectl apply -f - << 'EOF' 2>/dev/null
apiVersion: chaos-mesh.org/v1alpha1
kind: PodChaos
metadata:
  name: test-cross-namespace
  namespace: default
spec:
  action: pod-kill
  mode: one
  selector:
    namespaces:
      - production     # targeting a different namespace
    labelSelectors:
      app: payment-service
EOF
# If created successfully, the experiment will kill production pods
# This indicates insufficient RBAC scope controls

# Check controller ClusterRole permissions
kubectl get clusterrole chaos-mesh-controller-manager -o yaml 2>/dev/null | \
  grep -A5 '"pods"' | head -20
# Look for: get, list, watch, delete, create across all namespaces

Chaos Mesh Security Hardening

Chaos Mesh Security Hardening Checklist:
Security TestMethodRisk
Dashboard accessible without authenticationBrowse :2333 — creates/deletes experiments without loginCritical
Cross-namespace experiment targeting production podsApply PodChaos with target namespace: production — kills production podsCritical
chaos-daemon privileged container node accessexec into chaos-daemon pod — full host PID access enables process kill on nodeHigh
StressChaos DoS against production nodesCreate StressChaos with workers:8, load:100 targeting all pods on a nodeHigh
Controller ClusterRole excessive pod permissionsCheck ClusterRole — can list/delete pods across all namespacesHigh
IOChaos file corruption via path traversalCreate IOChaos with volumePath: / — may corrupt files outside container volumeMedium

Automate Chaos Mesh Security Testing

Ironimo tests Chaos Mesh deployments for unauthenticated Dashboard access enabling experiment creation and deletion, cross-namespace experiment targeting production pods, chaos-daemon privileged container node compromise, StressChaos denial of service against production workloads, controller ClusterRole granting excessive cross-namespace pod permissions, and IOChaos file corruption outside intended container paths.

Start free scan