# CVE-2021-25740: Kubernetes confused deputy in Endpoints and EndpointSlices

Source: https://junglewise.ai/threats/cve-2021-25740-kubernetes-confused-deputy-in-endpoints-and-endpointslices  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2021-09-21. Updated: 2026-06-09  
License: CC BY 4.0 with a link back

CVE-2021-25740 · Severity: low · CVSS 3.1 · Published 2021-09-21

A design flaw in Kubernetes allows users with limited permissions to redirect network traffic to unauthorized locations. By manipulating specific API resources, an attacker could bypass security controls to access internal backend services or sensitive endpoints they should not be able to reach. This issue affects the fundamental way Kubernetes handles network routing and requires manual configuration changes to mitigate.

Technologies: [k8s.io/kubernetes (Go)](https://junglewise.ai/threats/technologies/k8s-io-kubernetes), [Kubernetes](https://junglewise.ai/threats/technologies/kubernetes). Vendors: [Go](https://junglewise.ai/threats/vendors/go), [Kubernetes](https://junglewise.ai/threats/vendors/kubernetes).

## Quick answers

**Is CVE-2021-25740 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2021-25740 being exploited in the wild.

**How severe is CVE-2021-25740?** Low severity, with a CVSS score of 3.1, published 21 September 2021.

**Which products and versions are affected?** k8s.io/kubernetes (Go) <= 1.22.2, SEMVER:introduced=0,last_affected=1.22.2; Kubernetes <= 1.22.2.

**Is there a fix for CVE-2021-25740?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2021-25740 attacked?** It is attacked over the network, in an operating system.

**Am I affected by CVE-2021-25740?** Check whether you run k8s.io/kubernetes (Go) or Kubernetes at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A confused deputy vulnerability exists in Kubernetes due to the way Endpoint and EndpointSlice permissions are handled. Attackers with 'create' or 'edit' permissions for these resources can direct LoadBalancer or Ingress implementations to expose backend IPs that should be restricted. If the target's NetworkPolicy trusts the LoadBalancer or Ingress, this can bypass cross-namespace security controls and LoadBalancerSourceRanges. A similar attack vector exists for Ingress implementations that support forwarding to ExternalName Services. As this is a design flaw, no software patch is available; mitigation requires restricting write access to Endpoints and EndpointSlices by updating RBAC roles such as 'system:aggregate-to-edit'.

## Affected products

- Kubernetes Kubernetes <= 1.22.2

## Identifiers

- CVE-2021-25740
- GHSA-vw47-mr44-3jf9

## Timeline

- 2021-07-14: disclosed: Issue opened on Kubernetes GitHub repository
- 2021-09-20: advisory: NVD publication date
- 2021-09-21: advisory: GitHub Advisory published

## References

- [https://github.com/kubernetes/kubernetes/issues/103675](https://github.com/kubernetes/kubernetes/issues/103675)
- [https://groups.google.com/g/kubernetes-security-announce/c/WYE9ptrhSLE](https://groups.google.com/g/kubernetes-security-announce/c/WYE9ptrhSLE)
- [https://kubernetes.io/blog/2026/05/26/reconciling-unfixed-kubernetes-cves](https://kubernetes.io/blog/2026/05/26/reconciling-unfixed-kubernetes-cves)
- [https://security.netapp.com/advisory/ntap-20211014-0001](https://security.netapp.com/advisory/ntap-20211014-0001)

## Related threats

- [kube-controller-manager is vulnerable to half-blind Server Side Request Forgery through in-tree Portworx StorageClass](https://junglewise.ai/threats/cve-2025-13281-kube-controller-manager-is-vulnerable-to-half-blind-server-side)
- [A SQL Injection vulnerability exists in Esri ArcGIS Server versions 11.3, 11.4 and 11.5 on Windows, Linux and…](https://junglewise.ai/threats/cve-2025-57870-a-sql-injection-vulnerability-exists-in-esri-arcgis-server)
- [GO-2025-3915 - Kubernetes Nodes can delete themselves by adding an OwnerReference in k8s.io/kubernetes](https://junglewise.ai/threats/cve-2025-5187-kubernetes-nodes-can-delete-themselves-by-adding-an-ownerreference)
- [GO-2025-3774 - Kubernetes allows nodes to bypass dynamic resource allocation authorization checks in k8s.io/kubernetes](https://junglewise.ai/threats/cve-2025-4563-kubernetes-allows-nodes-to-bypass-dynamic-resource-allocation)
- [GO-2025-3645 - Kubernetes did not effectively clear service account credentials in k8s.io/kubernetes](https://junglewise.ai/threats/cve-2019-11243-kubernetes-did-not-effectively-clear-service-account-credentials)
