CVE-2021-32783
📋 TL;DR
This vulnerability in Contour Kubernetes ingress controller allows attackers to access Envoy's admin interface via specially crafted ExternalName Services. This enables remote denial of service, traffic manipulation, and exposure of secret metadata (though not secret content). All Contour users running vulnerable versions are affected.
💻 Affected Systems
- Contour (Kubernetes ingress controller)
📦 What is this software?
Contour by Projectcontour
⚠️ Risk & Real-World Impact
Worst Case
Complete shutdown of Envoy proxies causing service disruption, exposure of TLS certificate metadata, and potential traffic routing manipulation across the cluster.
Likely Case
Targeted denial of service against specific Envoy instances, exposure of secret metadata that could aid further attacks, and potential traffic disruption.
If Mitigated
Limited impact with proper network segmentation and access controls, though the vulnerability still exists in the software.
🎯 Exploit Status
Exploitation requires creating or modifying ExternalName Services, which typically requires Kubernetes RBAC permissions. The attack technique is documented in the advisory.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 1.17.1 (cherry-pick) and 1.18.0
Vendor Advisory: https://github.com/projectcontour/contour/security/advisories/GHSA-5ph6-qq5x-7jwc
Restart Required: Yes
Instructions:
1. Update Contour to version 1.17.1 or later. 2. Update Contour deployment manifests. 3. Restart Contour pods. 4. Verify Envoy pods restart with new configuration.
🔧 Temporary Workarounds
Restrict ExternalName Service Creation
allUse Kubernetes RBAC to prevent creation/modification of ExternalName Services in namespaces where Contour operates.
kubectl create clusterrole deny-externalname --verb=create,update,patch --resource=services --resource-name=ExternalName
kubectl create clusterrolebinding deny-externalname-binding --clusterrole=deny-externalname --group=system:authenticated
Network Policy Isolation
allImplement network policies to restrict access to Envoy admin interface (port 9001 by default) from unauthorized sources.
kubectl apply -f network-policy.yaml (with appropriate rules blocking external access to Envoy admin port)
🧯 If You Can't Patch
- Implement strict RBAC controls to prevent unauthorized users from creating or modifying ExternalName Services
- Deploy network policies to isolate Envoy admin interface and monitor for unauthorized access attempts
🔍 How to Verify
Check if Vulnerable:
Check Contour version: kubectl get deployment contour -n projectcontour -o jsonpath='{.spec.template.spec.containers[0].image}' | grep -o ':[0-9.]*'
Check Version:
kubectl get deployment contour -n projectcontour -o jsonpath='{.spec.template.spec.containers[0].image}'
Verify Fix Applied:
Verify Contour version is 1.17.1 or later and test that ExternalName Services cannot access Envoy admin interface
📡 Detection & Monitoring
Log Indicators:
- Unauthorized access attempts to Envoy admin interface (port 9001)
- Unexpected ExternalName Service creation/modification events in Kubernetes audit logs
Network Indicators:
- Traffic to Envoy admin port (default 9001) from unexpected sources
- ExternalName Service DNS resolution patterns matching attack vectors
SIEM Query:
source="kubernetes-audit" AND (resource="services" AND verb IN ("create", "update", "patch") AND objectRef.subresource="externalName") OR (destination.port=9001 AND NOT source.ip IN (allowed_admin_ips))
🔗 References
- https://github.com/projectcontour/contour/commit/b53a5c4fd927f4ea2c6cf02f1359d8e28bef852e
- https://github.com/projectcontour/contour/releases/tag/v1.17.1
- https://github.com/projectcontour/contour/security/advisories/GHSA-5ph6-qq5x-7jwc
- https://github.com/projectcontour/contour/commit/b53a5c4fd927f4ea2c6cf02f1359d8e28bef852e
- https://github.com/projectcontour/contour/releases/tag/v1.17.1
- https://github.com/projectcontour/contour/security/advisories/GHSA-5ph6-qq5x-7jwc